I think we have identified a defect in JMeter Load Test dashboard of GrafanaLabs (https://grafana.com/grafana/dashboards/1152) - $timeFilter was missed from Test Start/Test End Annotation Queries:
"annotations": {
"list": [
{
"datasource": "${DS_JMETER}",
"enable": true,
"iconColor": "rgb(23, 255, 0)",
"name": "Test Start",
"query": "SELECT * FROM testStartEnd WHERE type='started'",
"tagsColumn": "type",
"titleColumn": "testName"
},
{
"datasource": "${DS_JMETER}",
"enable": true,
"iconColor": "rgba(255, 96, 96, 1)",
"name": "Test End",
"query": "SELECT * FROM testStartEnd WHERE type='finished'",
"tagsColumn": "type",
"titleColumn": "testName"
}
]
},
Which caused 978 data points returning instead of 11 in our case:
> SELECT count(*) FROM testStartEnd WHERE type='started'
name: testStartEnd
time count_testName
---- --------------
0 978
> SELECT count(*) FROM testStartEnd WHERE type='started' AND time >= '2020-12-04 22:25:00' and time < '2020-12-04 23:15:00'
name: testStartEnd
time count_testName
---- --------------
1607120700000000000 11
Our Grafana Dashboard got slower and slower due to this defect when more and more test results were saved into the influx database.
After adding $timeFilter to Test Start/Test End Annotation Queries:
SELECT * FROM "$database"."autogen".testStartEnd WHERE type='started' AND $timeFilter
SELECT * FROM "$database"."autogen".testStartEnd WHERE type='finished' AND $timeFilter
Our Grafana Dashboard loading time reduced from 1.5m to 5s.
December 12th 2020, 1:22 am
by Ian Dai
Revision: 5