Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format number as time duration #5130

Closed
missnebun opened this issue Oct 16, 2015 · 9 comments · Fixed by #6499
Closed

Format number as time duration #5130

missnebun opened this issue Oct 16, 2015 · 9 comments · Fixed by #6499

Comments

@missnebun
Copy link

we store duration in seconds, but we need the ability to render them as minutes or (or ideally, and) hours.

In Elasticsearch we map the seconds field as number but in Kibana 4.1.1 I do not not have the option to convert in date.

image

@rashidkpc rashidkpc changed the title Field Formatting Format number as time duration Oct 16, 2015
@marcfowler
Copy link

+1 for this - would be really helpful. This wasn't included in #1543.

@basicNew
Copy link

I used the Number format and '00:00:00' as formatting pattern and seems to do the trick (see https://adamwdraper.github.io/Numeral-js/ the "Time" section). Is that what you are looking for?

@benallenallen
Copy link

+1. It seems like this is "almost" there. The '00:00:00' format gets us hours, minutes, and seconds, but some of our durations are days long, so showing 73:15:30 on the dashboard isn't exactly what the business is usually looking for (they would expect to see 3.05 days). Would think this would have to be moment.js since Numeral-js only supports very basic time parsing.

@robison
Copy link

robison commented Jan 14, 2016

This would be tremendous to be able to convert milliseconds/microseconds on the y-axis, e.g.: plotting request service time.

@kofemann
Copy link

kofemann commented Apr 6, 2016

Thanks for adding the duration type. Unfortunately, it doesn't work well with small intervals, like microseconds and nanoseconds, especially on the y-axis:

screenshot from 2016-04-06 09-18-00

I would expect something like this:

93.387ms
283µs
3s

@bevacqua
Copy link
Contributor

bevacqua commented Apr 6, 2016

@kofemann What if you pick a field output format other than Human Readable?

@kofemann
Copy link

kofemann commented Apr 6, 2016

@bevacqua this will work, of course, but difference between microseconds and seconds is 1e6. So you really have to count number of '0' to get the right number ( well, commas help). Nevertheless, I prefer Human Readable :)

@bevacqua
Copy link
Contributor

bevacqua commented Apr 6, 2016

moment's human-readable relative time format (what we use to display relative time in "human speak") isn't really capable of handling sub-second precision. Using another output format will have to do.

If you think we should add sub-second precision to the human readable format please open a new issue. Thank you! 🎉

@kofemann
Copy link

kofemann commented Apr 6, 2016

The beats and Co. have many metrics which wich have time intervals in sub-second range. To make dashboards more user-friendly, support sub-second precision will really help. I will open a new issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants