<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: what does perc95 and all those stats functions perc* in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/541662#M153368</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1357"&gt;@yannK&lt;/a&gt;! Hope all is well! Time flies huh? 2013...**bleep**!&lt;/P&gt;&lt;P&gt;I have come from the future to add an example where I applied perc95 to application access logging - &amp;nbsp;an oft asked party trick app developers ask for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I &amp;nbsp;stumbled on this post while working on analyzing some service mesh logging and reading the perc95 docs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The year is now 2021 and&amp;nbsp;&lt;SPAN&gt;I have events from a traffic gateway (Istio - think access_combined type stuff) and I receive access logging events for my "Ingress traffic".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[2021-02-28T13:35:35.921Z] "GET /code/mattymo/docker_addon_builder/-/branches/all?sort=updated_asc HTTP/1.1" 200 - "-" "-" 0 9656 574 570 "185.191.171.6" "Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)" "349525cc-6fff-9c55-af95-986cb31bdf70" "mattymo.io" "10.1.74.210:443" outbound|443||gitlab.gitlab.svc.cluster.local - 10.1.74.189:443 185.191.171.6:16156 mattymo.io -&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This event then gets parsed to provide me many fields but the two ill use here will be "duration" and "upstream_cluster".&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the event above, for example, "duration=574" and "upstream_cluster="outbound|443||gitlab.gitlab.svc.cluster.local"&lt;/P&gt;&lt;P&gt;As an&amp;nbsp;app developer or performance analyst or SRE....or frankly as anyone who cares, I will invaribly want to ask Splunk to find out what my &amp;nbsp;application response times are.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=k8s pod="istio-ingressgateway*"
| stats count, perc50(duration) AS "Median Duration", perc95(duration) AS "95th Percentile Duration" by cluster_name, upstream_cluster
| sort - "95th Percentile Duration"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattymo_0-1614520597142.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13111i2985BD1AF3B72F54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattymo_0-1614520597142.png" alt="mattymo_0-1614520597142.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This table gets me started with analyzing web traffic and the time it takes to serve my gitlab, ghost and Splunk apps! I can immediately start to drill into customer requests that take large amounts of time to serve!&lt;BR /&gt;&lt;BR /&gt;Here's to &amp;nbsp;8 more years &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 28 Feb 2021 14:06:53 GMT</pubDate>
    <dc:creator>mattymo</dc:creator>
    <dc:date>2021-02-28T14:06:53Z</dc:date>
    <item>
      <title>what does perc95 and all those stats functions perc*</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/39443#M9000</link>
      <description>&lt;P&gt;In stats calculation, I use average avg() and median but I saw other people using "percentage Xth" like perc95().&lt;BR /&gt;
What does it do exactly ?&lt;/P&gt;

&lt;P&gt;see docs &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Commonstatsfunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Commonstatsfunctions&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;This function returns the X-th percentile value of the field Y, where X is an integer between 1 and 99. The functions perc, p, and upperperc give approximate values for the integer percentile requested. The approximation algorithm used provides a strict bound of the actual value at for any percentile. The functions perc and p return a single number that represents the lower end of that range while upperperc gives the approximate upper bound. exactperc provides the exact value, but will be very expensive for high cardinality fields.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 19 Aug 2013 20:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/39443#M9000</guid>
      <dc:creator>mataharry</dc:creator>
      <dc:date>2013-08-19T20:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: what does perc95 and all those stats functions perc*</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/39444#M9001</link>
      <description>&lt;P&gt;The percentile Xth function will sort the results in an increasing order. &lt;BR /&gt;
Then considering that 0% is the lowest, and 100% the highest, pick the exact value that correspond to the position of the X% value.&lt;/P&gt;

&lt;P&gt;To clarify, perc50() is equivalent to median(). It will pick the value in the middle of the range.&lt;/P&gt;

&lt;P&gt;see other explanations&lt;BR /&gt;
&lt;A href="http://www.semaphore.com/blog/2011/04/04/95th-percentile-bandwidth-metering-explained-and-analyzed"&gt;http://www.semaphore.com/blog/2011/04/04/95th-percentile-bandwidth-metering-explained-and-analyzed&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;A good example worth all the explanations :&lt;BR /&gt;
with 10 events like "value=Y"&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source=mytest | stats list(value) avg(value) median(value) perc95(value)&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;list of values = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}&lt;BR /&gt;
avg(value)=5.500000 &lt;BR /&gt;
median(value)=6 &lt;BR /&gt;
perc95(value)=10     &lt;/P&gt;

&lt;P&gt;list of values = {1, 1, 1, 10, 9, 1, 1, 1, 1, 1}&lt;BR /&gt;
avg(value)=2.700000 &lt;BR /&gt;
median(value)=1 &lt;BR /&gt;
perc95(value)=10     &lt;/P&gt;

&lt;P&gt;list of values = {10,10,10,10,10,5,5,1,1,1,1}&lt;BR /&gt;
avg(value)=5.818182 &lt;BR /&gt;
median(value)=5&lt;BR /&gt;
perc95(value)=10     &lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 20:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/39444#M9001</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-08-19T20:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: what does perc95 and all those stats functions perc*</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/541662#M153368</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1357"&gt;@yannK&lt;/a&gt;! Hope all is well! Time flies huh? 2013...**bleep**!&lt;/P&gt;&lt;P&gt;I have come from the future to add an example where I applied perc95 to application access logging - &amp;nbsp;an oft asked party trick app developers ask for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I &amp;nbsp;stumbled on this post while working on analyzing some service mesh logging and reading the perc95 docs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The year is now 2021 and&amp;nbsp;&lt;SPAN&gt;I have events from a traffic gateway (Istio - think access_combined type stuff) and I receive access logging events for my "Ingress traffic".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[2021-02-28T13:35:35.921Z] "GET /code/mattymo/docker_addon_builder/-/branches/all?sort=updated_asc HTTP/1.1" 200 - "-" "-" 0 9656 574 570 "185.191.171.6" "Mozilla/5.0 (compatible; SemrushBot/7~bl; +http://www.semrush.com/bot.html)" "349525cc-6fff-9c55-af95-986cb31bdf70" "mattymo.io" "10.1.74.210:443" outbound|443||gitlab.gitlab.svc.cluster.local - 10.1.74.189:443 185.191.171.6:16156 mattymo.io -&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This event then gets parsed to provide me many fields but the two ill use here will be "duration" and "upstream_cluster".&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the event above, for example, "duration=574" and "upstream_cluster="outbound|443||gitlab.gitlab.svc.cluster.local"&lt;/P&gt;&lt;P&gt;As an&amp;nbsp;app developer or performance analyst or SRE....or frankly as anyone who cares, I will invaribly want to ask Splunk to find out what my &amp;nbsp;application response times are.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=k8s pod="istio-ingressgateway*"
| stats count, perc50(duration) AS "Median Duration", perc95(duration) AS "95th Percentile Duration" by cluster_name, upstream_cluster
| sort - "95th Percentile Duration"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattymo_0-1614520597142.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13111i2985BD1AF3B72F54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattymo_0-1614520597142.png" alt="mattymo_0-1614520597142.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This table gets me started with analyzing web traffic and the time it takes to serve my gitlab, ghost and Splunk apps! I can immediately start to drill into customer requests that take large amounts of time to serve!&lt;BR /&gt;&lt;BR /&gt;Here's to &amp;nbsp;8 more years &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 14:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-does-perc95-and-all-those-stats-functions-perc/m-p/541662#M153368</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2021-02-28T14:06:53Z</dc:date>
    </item>
  </channel>
</rss>

