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

Time Spent in application code

nrql

#1

Does this code give me the percentage of time application code takes less than the designated time?

SELECT percentage(count(*), WHERE duration - externalDuration - databaseDuration <= 2) AS 'Under 2 Seconds' FROM Transaction WHERE appName = '<appname>' AND httpResponseCode IS NOT NULL AND name LIKE '%somename%' SINCE 7 days ago


#2

That’s a “depends”. I say that because your “external” might be calls that this application makes against itself. Also, db duration is a component of “application time” for many people. Without knowing how you would use this I would just be cautious about how these numbers can vary widely by application. I’d hesitate before applying this sort of query across lots of apps without context for each app.


#3

Thanks buddy, I will need to do some digging in order to see how this is broken down in greater detail. Can I use tracing to figure out what is attributed to which?