Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 1a03ade

Browse files
authored
Fix Peak RPS calculation, shared tooltip and fix VU display in the Performance Overview (#165)
* Shared tooltip and Peak RPS calculation * fixes * fixes * fixes * Remove ID * fix
1 parent 4737495 commit 1a03ade

File tree

1 file changed

+53
-25
lines changed

1 file changed

+53
-25
lines changed

grafana/dashboards/k6-prometheus.json

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"description": "Visualize k6 OSS results stored in Prometheus",
1919
"editable": true,
2020
"fiscalYearStartMonth": 0,
21-
"graphTooltip": 0,
21+
"gnetId": 19665,
22+
"graphTooltip": 2,
2223
"links": [
2324
{
2425
"asDropdown": false,
@@ -46,6 +47,7 @@
4647
"mode": "palette-classic"
4748
},
4849
"custom": {
50+
"axisBorderShow": false,
4951
"axisCenteredZero": false,
5052
"axisColorMode": "text",
5153
"axisLabel": "",
@@ -212,7 +214,7 @@
212214
"showLegend": true
213215
},
214216
"tooltip": {
215-
"mode": "single",
217+
"mode": "multi",
216218
"sort": "none"
217219
}
218220
},
@@ -223,7 +225,7 @@
223225
"uid": "${DS_PROMETHEUS}"
224226
},
225227
"editorMode": "code",
226-
"expr": "avg(k6_vus{testid=~\"$testid\"})",
228+
"expr": "sum(k6_vus{testid=~\"$testid\"})",
227229
"instant": false,
228230
"legendFormat": "vus",
229231
"range": true,
@@ -339,9 +341,11 @@
339341
"fields": "",
340342
"values": false
341343
},
342-
"textMode": "auto"
344+
"showPercentChange": false,
345+
"textMode": "auto",
346+
"wideLayout": true
343347
},
344-
"pluginVersion": "10.1.2",
348+
"pluginVersion": "10.4.0",
345349
"targets": [
346350
{
347351
"datasource": {
@@ -401,9 +405,11 @@
401405
"fields": "",
402406
"values": false
403407
},
404-
"textMode": "auto"
408+
"showPercentChange": false,
409+
"textMode": "auto",
410+
"wideLayout": true
405411
},
406-
"pluginVersion": "10.1.2",
412+
"pluginVersion": "10.4.0",
407413
"targets": [
408414
{
409415
"datasource": {
@@ -462,9 +468,11 @@
462468
"fields": "",
463469
"values": false
464470
},
465-
"textMode": "auto"
471+
"showPercentChange": false,
472+
"textMode": "auto",
473+
"wideLayout": true
466474
},
467-
"pluginVersion": "10.1.2",
475+
"pluginVersion": "10.4.0",
468476
"targets": [
469477
{
470478
"datasource": {
@@ -474,12 +482,19 @@
474482
"editorMode": "code",
475483
"expr": "sum(irate(k6_http_reqs_total{testid=~\"$testid\"}[$__rate_interval]))",
476484
"instant": false,
485+
"interval": "",
477486
"legendFormat": "__auto",
478487
"range": true,
479488
"refId": "A"
480489
}
481490
],
482491
"title": "Peak RPS",
492+
"transformations": [
493+
{
494+
"id": "reduce",
495+
"options": {}
496+
}
497+
],
483498
"type": "stat"
484499
},
485500
{
@@ -524,9 +539,11 @@
524539
"fields": "",
525540
"values": false
526541
},
527-
"textMode": "auto"
542+
"showPercentChange": false,
543+
"textMode": "auto",
544+
"wideLayout": true
528545
},
529-
"pluginVersion": "10.1.2",
546+
"pluginVersion": "10.4.0",
530547
"targets": [
531548
{
532549
"datasource": {
@@ -555,6 +572,7 @@
555572
"mode": "palette-classic"
556573
},
557574
"custom": {
575+
"axisBorderShow": false,
558576
"axisCenteredZero": false,
559577
"axisColorMode": "text",
560578
"axisLabel": "",
@@ -660,6 +678,7 @@
660678
"mode": "palette-classic"
661679
},
662680
"custom": {
681+
"axisBorderShow": false,
663682
"axisCenteredZero": false,
664683
"axisColorMode": "text",
665684
"axisLabel": "",
@@ -792,6 +811,7 @@
792811
"mode": "palette-classic"
793812
},
794813
"custom": {
814+
"axisBorderShow": false,
795815
"axisCenteredZero": false,
796816
"axisColorMode": "text",
797817
"axisLabel": "",
@@ -827,7 +847,8 @@
827847
"mode": "absolute",
828848
"steps": [
829849
{
830-
"color": "green"
850+
"color": "green",
851+
"value": null
831852
}
832853
]
833854
},
@@ -965,6 +986,7 @@
965986
"mode": "palette-classic"
966987
},
967988
"custom": {
989+
"axisBorderShow": false,
968990
"axisCenteredZero": false,
969991
"axisColorMode": "text",
970992
"axisLabel": "",
@@ -1001,7 +1023,8 @@
10011023
"mode": "absolute",
10021024
"steps": [
10031025
{
1004-
"color": "green"
1026+
"color": "green",
1027+
"value": null
10051028
}
10061029
]
10071030
},
@@ -1144,6 +1167,7 @@
11441167
"mode": "palette-classic"
11451168
},
11461169
"custom": {
1170+
"axisBorderShow": false,
11471171
"axisCenteredZero": false,
11481172
"axisColorMode": "text",
11491173
"axisLabel": "",
@@ -1180,7 +1204,8 @@
11801204
"mode": "absolute",
11811205
"steps": [
11821206
{
1183-
"color": "green"
1207+
"color": "green",
1208+
"value": null
11841209
}
11851210
]
11861211
},
@@ -1349,7 +1374,8 @@
13491374
"mode": "absolute",
13501375
"steps": [
13511376
{
1352-
"color": "green"
1377+
"color": "green",
1378+
"value": null
13531379
}
13541380
]
13551381
}
@@ -1462,7 +1488,7 @@
14621488
"frameIndex": 2,
14631489
"showHeader": true
14641490
},
1465-
"pluginVersion": "10.1.2",
1491+
"pluginVersion": "10.4.0",
14661492
"targets": [
14671493
{
14681494
"datasource": {
@@ -1636,7 +1662,8 @@
16361662
"mode": "absolute",
16371663
"steps": [
16381664
{
1639-
"color": "green"
1665+
"color": "green",
1666+
"value": null
16401667
}
16411668
]
16421669
}
@@ -1711,7 +1738,7 @@
17111738
}
17121739
]
17131740
},
1714-
"pluginVersion": "10.1.2",
1741+
"pluginVersion": "10.4.0",
17151742
"targets": [
17161743
{
17171744
"datasource": {
@@ -1802,6 +1829,7 @@
18021829
"mode": "palette-classic"
18031830
},
18041831
"custom": {
1832+
"axisBorderShow": false,
18051833
"axisCenteredZero": false,
18061834
"axisColorMode": "text",
18071835
"axisLabel": "",
@@ -1839,7 +1867,8 @@
18391867
"mode": "absolute",
18401868
"steps": [
18411869
{
1842-
"color": "green"
1870+
"color": "green",
1871+
"value": null
18431872
}
18441873
]
18451874
},
@@ -1904,13 +1933,12 @@
19041933
"content": "### Visualize other k6 results \n\nAt the top of the dashboard, click `Add` and select `Visualization` from the dropdown menu. Choose the visualization type and input the PromQL queries for the `k6_` metric(s).\n\nAlternatively, click on the `Explore` icon on the menu bar and input the queries for the `k6_` metric(s). From `Explore`, you can add new Panels to this dashboard. \n\nNote that all <a href=\"https://k6.io/docs/using-k6/metrics/\" target=\"_blank\">k6 metrics</a> are prefixed with the `k6_` namespace when sent to Prometheus.",
19051934
"mode": "markdown"
19061935
},
1907-
"pluginVersion": "10.1.2",
1936+
"pluginVersion": "10.4.0",
19081937
"type": "text"
19091938
}
19101939
],
19111940
"refresh": "",
1912-
"schemaVersion": 38,
1913-
"style": "dark",
1941+
"schemaVersion": 39,
19141942
"tags": [
19151943
"prometheus",
19161944
"k6"
@@ -1921,7 +1949,7 @@
19211949
"current": {
19221950
"selected": false,
19231951
"text": "prometheus",
1924-
"value": "P1809F7CD0C75ACF3"
1952+
"value": "${DS_PROMETHEUS}"
19251953
},
19261954
"description": "Choose a Prometheus Data Source",
19271955
"hide": 0,
@@ -2021,6 +2049,6 @@
20212049
"timezone": "",
20222050
"title": "k6 Prometheus",
20232051
"uid": "ccbb2351-2ae2-462f-ae0e-f2c893ad1028",
2024-
"version": 1,
2052+
"version": 2,
20252053
"weekStart": ""
2026-
}
2054+
}

0 commit comments

Comments
 (0)