Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Calculating 90% of response times for every transaction


#1

Hi,

I have written a query for calculating a 90% response time of particular transaction.
it looks like

SELECT percentile(duration * 1000, 90) as ‘Response Time’ FROM Transaction where name = ‘XXXX’ and appName = ‘XXXX’ SINCE ‘2020-02-06 00:38:00-0800’ UNTIL ‘2020-02-06 00:49:00-0800’

Is there any concept of for loop in newrelic, so i can check for every transaction ?
Or
Is there a better way out where I can achieve 90% response time of all transactions.

Thanks,
Palla.


made this topic public #2

#3

Hello, @palla.kumar: Try this:

SELECT percentile(duration * 1000, 90) AS 'Response Time' 
FROM Transaction 
WHERE appName = ‘XXXX’ 
FACET name

#4

Hi, @philweber:
for FACET name i tried with code as below
FACET (where name like ‘%WebTransaction/MVC/%’ AS ‘AllHandler’)

but it is grouping all transactions of type MVC and giving it’s 90% value.

After this, I tried something like
FACET CASES (where name like ‘%WebTransaction/MVC/ABCHandler%’ AS ‘ABCHandler’,
where name like ‘%WebTransaction/MVC/DEFHandler%’ AS ‘DEFHandler’)
for getting 90% values of transactions separately.

Can I optimize the above lines of code, so that i should not mention every transaction name explicitly?

Thanks,
Palla.


#5

Try this:

SELECT percentile(duration * 1000, 90) AS 'Response Time' 
FROM Transaction 
WHERE appName = ‘XXXX’ 
  AND name LIKE '%WebTransaction/MVC/%'
FACET name

#6

Thanks, @philweber.
it worked.
In the meanwhile , i checked by removing the where clause, it also worked.

Regards,
Palla.


#7

Great!! Thanks for confirming that worked for you :smiley: