Getting Data In

Time format for identifying processing rate

msbhatmam
New Member

I am trying to get some details from my event text which has the record count and also the processing time. I want to find the processing rate.I.e records/processing time. I could find that the processing time
Is like 1.2s where s is seconds. Sometimes its like 567ms where ms is milliseconds or 1h2m.0030s where h m and s are hours minutes and second respectively.

Is there any function which can help me to convert it all into either ms
or seconds. Or could could you please suggest how I could change it into a unified format like seconds ?

As I am stuck with critical deliverable need your inputs as soon as possible 😞

0 Karma

woodcock
Esteemed Legend

Like this:

 ... | eval durationSeconds =coalesce(strptime(fieldname, "%Hh%Mm%S.%Ns"), strptime(fieldname, "%Nms"))

You may need to add more pieces to the coalesce to accommodate other alternate formats.

0 Karma

somesoni2
Revered Legend
0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...