Splunk Search

timechart span using used time instead of full hour

tuxford
Path Finder

Hello

Lets say you timechart with span=1h and within that hour you have 10000 requests that you need to calculate the average service time, is it possible to do that with the time used by the 10000 requests and not the full hour? Lets say that the total time spent servicing those requests are 20 minutes and nothing happens for the rest of the hour. If you take an average for the full hour that value will be very different from the average if you only use the total time spent working, and the value with only the time spent working will be more correct?

Tags (1)
0 Karma
1 Solution

Ayn
Legend

This is already how timechart behaves.

The span parameter to timechart doesn't affect the statistical calculations it's performing, it only dictates how events should be put in discrete buckets. When you do for instance timechart span=1h avg(time_taken), what it does is simply to take all the events and get an average of the time_taken from them.

View solution in original post

Ayn
Legend

This is already how timechart behaves.

The span parameter to timechart doesn't affect the statistical calculations it's performing, it only dictates how events should be put in discrete buckets. When you do for instance timechart span=1h avg(time_taken), what it does is simply to take all the events and get an average of the time_taken from them.

Ayn
Legend

Well it depends on how the events are distributed, but yes, if all the events end up into one of the 20 minute spans, the average value will be identical.

0 Karma

tuxford
Path Finder

So, a span=1h will yield the same result as span=20m? within that hour

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...