ekg
ekg copied to clipboard
Add wall clock time and CPU time
Could wall clock time and CPU time be added to the ekg output? They would be very helpful.
The wall clock time is already there as ekg.server_time_ms
. We could add the CPU time as ekg.server_cpu_time
or similar. Want to give it a try?
I don't see ekg.server_time_ms
. I do see ekg.server_timestamp_ms
, which is not what I want (Although I notice the comment does say ekg.server_time_ms
. Is that a mistake?). It seems to be some arbitrary timestamp. I would like to see the elapsed time since the program started running.
Is elapsed time actually missing then? If so I'm happy to try to add it.
I think the comment is wrong and it should say ekg.server_timestamp_ms
. I have been thinking about adding other metrics, such as scraping /proc
on Unix. It should be doable without changing ekg at all. You need to use ekg-core and define e.g. a new group of metrics using registerGroup
. registerGroup
is for pulling groups of metrics on demand. This is good for things like the current time. You should be able to have registerGroup
read /proc
and pull out all kinds of interesting metrics. Perhaps you could even publish it as a new ekg package!