Getting discrepancy in the console Test Summary Results and Prometheus metrics

Hi Team,
Hope you are doing well?
I am stuck at a point where I want to visualise the metrics emitted by k6. For visualisation I am using Prometheus integration + grafana
The integration part works fine.
But, when I tried to plot some graph and structure promql, I see a small discrepancy in total request count
e.g. the console shows total request count as 127 as shown in the screenshot below :

Whereas when I try to calculate the total request count via below promql

sum(count_over_time(k6_http_reqs[$__range]))

I get the result as 126…There is a discrepancy of 1 which is important to me as there is 1 check failing which I want to highlight in the graph
Any help will be highly appreciated.
Thanks in advance,
Nishant Shah

Hi @nishant.shah2 !

Welcome to the community forums! :wave:

:thinking: Interesting, is it a one-time issue, or it’s reproducible? Also, do you have a chance to open the Prometheus UI and check what is there for the k6_http_reqs metrics?

Cheers!

Hi @olegbespalov
Thanks for your reply
Sorry for delayed revert.
I tried k6_http_reqs metrics in Prometheus UI and it does correctly show the count 127
But still not able to figure out why the above promql shows 126

Thanks!