Percentiles calculation on New Relic

Hello @lssoares !
I was checking your question and it seems to be slightly more related to NewRelic than k6, but I think where I could give you some insights from the k6 side.
k6 doesn’t send percentile values as metrics per se .
This was discussed in this thread: Add 99, 99.5 percentile stats to built-in HTTP trend metrics
Most probably, New Relic is receiving each response time as a single metric.
I was doing some research and it seems like it is indeed a matter with NewRelic’s query.
Found there were some changes with the percentile function. Improvements to NRQL percentile() | New Relic Documentation

I found a couple examples for max and for 90pct in k6 documentation. Pasting them below, but again it seems to me more like a NR query matter.
For 90th
SELECT sum(k6.http_req_duration.sum.percentiles) AS '90th' FROM Metric WHERE percentile = 90 TIMESERIES
For Max
SELECT max(k6.http_req_duration.summary) AS 'Max Duration' FROM Metric TIMESERIES

Hope that helped. If not, let me know as it has been a while since I last played with NR, and it would be an interesting finding to have.
Best of lucks!
Gracias,
Leandro Melendez

1 Like