I need to measure throughput for my application (transaction count in 24hr period).
A count of events in ‘transaction’ gives me an overall count, but I want to divide the results into 0.5 second “time buckets” for greater visibility of what’s going on.
This query does that for me using FILTER. It produces a single result, with the three time buckets as columns:
FILTER(count(*), WHERE totalTime <= 0.5 as 'totalTime <=0.5'),
FILTER(count(*), WHERE totalTime <= 1.0 and totalTime > 0.5 as '0.5 > totalTime <= 1.0'),
FILTER(count(*), WHERE totalTime > 1.0 as 'totalTime > 1.0')
WHERE appName = 'my_app_name'
SINCE yesterday until today
The data looks like this:
I’d like it to return 3 records rather than 1, like this:
'11-Aug-2019','0.5 > totalTime <= 1.0','150'
'11-Aug-2019','totalTime > 1.0','10'
Can anyone see a way to do this using NRQL?