<?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: time format and evaluation for charting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/time-format-and-evaluation-for-charting/m-p/26553#M5144</link>
    <description>&lt;P&gt;Have you tried converting to seconds instead? As long as you dont have any really long durations I think this would work and be easiest for users to read.&lt;/P&gt;

&lt;P&gt;"Convert mstime" would work out of the box, but the %H in your duration throws a wrench in the built in command... You could strip the hours, as long you never need them.&lt;/P&gt;

&lt;P&gt;eval processtime=substr(app_dur,3,11) | convert mstime(processtime)&lt;/P&gt;

&lt;P&gt;Should result in: 0.596000&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2012 19:08:40 GMT</pubDate>
    <dc:creator>axinjakson</dc:creator>
    <dc:date>2012-11-07T19:08:40Z</dc:date>
    <item>
      <title>time format and evaluation for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-format-and-evaluation-for-charting/m-p/26552#M5143</link>
      <description>&lt;P&gt;I have a log entry that looks like:&lt;/P&gt;

&lt;P&gt;2012-11-07 06:55:42,963 INFO  [dler-HTTPThreadGroup-1242] RID=1352300142367-150943 c.r.c.u.w.f.ElapsedTimeCommonsLoggingFilter - Elapsed Time: 0:00:00.596 (596) /t2services_dis/RpsImageArchiveService#GetURLRequest&lt;/P&gt;

&lt;P&gt;From that I pull Elapsed Time: 0:00:00.596 and slice out 0:00:00.596.  This is the application duration (app_dur) for that java service/method call.&lt;/P&gt;

&lt;P&gt;As this is a string I need to change it to something Splunk can work with.  I can do that with either convert:&lt;BR /&gt;
convert timeformat="%H:%M:%S.%Q" mktime(app_dur) as processtime&lt;BR /&gt;
or eval:&lt;BR /&gt;
eval  processtime = strptime(app_dur, "%H:%M:%S.%Q")&lt;/P&gt;

&lt;P&gt;In either case, I get a number that looks like, say, 1352268077.5060000 (with convert it is limited to three decimal places).  This NOT human readable. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What I want to do is create a timechart of execution time in a format that the user can understand and so far I can not accomplish this feat.&lt;/P&gt;

&lt;P&gt;Just a simple chart with time across the bottom and the max/min/median/perc95, or whatever, values for application duration on a per process basis. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-format-and-evaluation-for-charting/m-p/26552#M5143</guid>
      <dc:creator>tyronetv</dc:creator>
      <dc:date>2020-09-28T12:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: time format and evaluation for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-format-and-evaluation-for-charting/m-p/26553#M5144</link>
      <description>&lt;P&gt;Have you tried converting to seconds instead? As long as you dont have any really long durations I think this would work and be easiest for users to read.&lt;/P&gt;

&lt;P&gt;"Convert mstime" would work out of the box, but the %H in your duration throws a wrench in the built in command... You could strip the hours, as long you never need them.&lt;/P&gt;

&lt;P&gt;eval processtime=substr(app_dur,3,11) | convert mstime(processtime)&lt;/P&gt;

&lt;P&gt;Should result in: 0.596000&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 19:08:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-format-and-evaluation-for-charting/m-p/26553#M5144</guid>
      <dc:creator>axinjakson</dc:creator>
      <dc:date>2012-11-07T19:08:40Z</dc:date>
    </item>
  </channel>
</rss>

