Skip to content

Commit

Permalink
fix(#90): incorrect cht replication dashboard apdex calculations (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennsippell authored Sep 28, 2023
1 parent 8f25580 commit a46358a
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 70
"value": 80
},
{
"color": "#299c46",
"value": 90
"value": 98
}
]
},
Expand Down Expand Up @@ -110,7 +110,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100",
"expr": "(\n ( \n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n + (\n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"360\",code=~\"^2..$\"}[$__range]))\n - sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n ) / 2\n ) / sum(delta(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}[$__range]))\n) * 100",
"legendFormat": "score",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -288,7 +288,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "(\n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}\n\t)\n)*100",
"expr": "(\n\t(\n\t\tsum(\n\t\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t\t)\n\t\t+ sum(\n\t\t\tcht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",ge=\"3600\",code=~\"^2..$\"} OR on() vector(0)\n\t\t)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}\n\t)\n)*100",
"legendFormat": "error %",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -354,7 +354,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"360\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^2..$\"})\n) * 100",
"expr": "(\n ( \n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n + (\n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"360\",code=~\"^2..$\"}[$__range]))\n - sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n ) / 2\n ) / sum(delta(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}[$__range]))\n) * 100",
"legendFormat": "score",
"range": true,
"refId": "A"
Expand Down Expand Up @@ -572,7 +572,7 @@
"value": "2m"
},
{
"selected": true,
"selected": false,
"text": "10m",
"value": "10m"
},
Expand All @@ -582,7 +582,7 @@
"value": "30m"
},
{
"selected": false,
"selected": true,
"text": "1h",
"value": "1h"
},
Expand Down Expand Up @@ -626,7 +626,7 @@
]
},
"time": {
"from": "now-3h",
"from": "now-1d",
"to": "now"
},
"timepicker": {
Expand All @@ -646,6 +646,6 @@
"timezone": "",
"title": "CHT Replication",
"uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b",
"version": 5,
"version": 6,
"weekStart": ""
}

0 comments on commit a46358a

Please sign in to comment.