Commit 460160cf by Torkel Ödegaard

feat(testdata): added test case for ms resolution data

parent 22e88856
......@@ -28,8 +28,8 @@ func init() {
Name: "Random Walk",
Handler: func(query *tsdb.Query, context *tsdb.QueryContext) *tsdb.QueryResult {
timeWalkerMs := context.TimeRange.MustGetFrom().Unix() * 1000
to := context.TimeRange.MustGetTo().Unix() * 1000
to := context.TimeRange.MustGetTo().UnixNano() / int64(time.Millisecond)
timeWalkerMs := context.TimeRange.MustGetFrom().UnixNano() / int64(time.Millisecond)
series := newSeriesForQuery(query)
......@@ -81,7 +81,6 @@ func init() {
return queryRes
},
})
}
func registerScenario(scenario *Scenario) {
......
{
"revision": 2,
"revision": 3,
"title": "TestData - Graph Panel Last 1h",
"tags": [
"grafana-test"
......@@ -35,6 +35,7 @@
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
......@@ -48,8 +49,8 @@
{
"refId": "A",
"scenario": "random_walk",
"target": "",
"scenarioId": "no_data_points"
"scenarioId": "no_data_points",
"target": ""
}
],
"thresholds": [],
......@@ -86,8 +87,7 @@
"min": null,
"show": true
}
],
"links": []
]
},
{
"aliasColors": {},
......@@ -109,6 +109,7 @@
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
......@@ -122,8 +123,8 @@
{
"refId": "A",
"scenario": "random_walk",
"target": "",
"scenarioId": "datapoints_outside_range"
"scenarioId": "datapoints_outside_range",
"target": ""
}
],
"thresholds": [],
......@@ -160,17 +161,89 @@
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "Grafana TestData",
"editable": true,
"error": false,
"fill": 1,
"id": 3,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"scenario": "random_walk",
"scenarioId": "random_walk",
"target": ""
}
],
"links": []
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Random walk series",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"title": "New row"
},
{
"title": "New row",
"height": "250px",
"editable": true,
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"aliasColors": {},
......@@ -179,7 +252,7 @@
"editable": true,
"error": false,
"fill": 1,
"id": 3,
"id": 4,
"isNew": true,
"legend": {
"avg": false,
......@@ -192,6 +265,7 @@
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
......@@ -205,14 +279,14 @@
{
"refId": "A",
"scenario": "random_walk",
"target": "",
"scenarioId": "random_walk"
"scenarioId": "random_walk",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeFrom": "5d",
"timeShift": null,
"title": "Random walk series",
"title": "Millisecond res x-axis and tooltip",
"tooltip": {
"msResolution": false,
"shared": true,
......@@ -243,14 +317,14 @@
"min": null,
"show": true
}
],
"links": []
]
}
]
],
"title": "New row"
}
],
"time": {
"from": "now-6h",
"from": "now-1h",
"to": "now"
},
"timepicker": {
......@@ -284,6 +358,7 @@
"annotations": {
"list": []
},
"refresh": false,
"schemaVersion": 13,
"version": 4,
"links": [],
......
......@@ -9,7 +9,7 @@
"name": "Grafana Project",
"url": "http://grafana.org"
},
"version": "1.0.5",
"version": "1.0.6",
"updated": "2016-09-26"
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment