Splunk Search

Percentile calculation

chaitu99
Explorer

source="file.txt" | transaction startswith="message1" endswith="message2" | stats count values(duration) as DUR

log file 5 events are matching

count DUR
5 0.095
0.056
0.075
0.064
0.095

I want to calculate the percentage of all events duration coming which is less than 75 miliseconds.

Please let me know how to go ahead.

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...