Simple clarification to Latency plugin logging #169

merged 1 commit into from Apr 23, 2012

3 participants


Latency plugin now logs in the format:

LATENCY: 0.4608631134033203 ms

I found this version a little easier to understand than the previous output which did not identify the units of measure and included the 1 second elapsed time of the logging timer itself.

@dj2 dj2 merged commit 3be0818 into postrank-labs:master Apr 23, 2012
postrank-labs member

Nice, thanks.

postrank-labs member

I'm not 100% with this.. The latency of the reactor is the time that elapses between the scheduled ticks, not the delay or overhead imposed on top of it for some reason (which could be numerous).

Formatting wise, the change makes sense.. Although I would trim the precision also.


@igrigorik - I was motivated by this rdoc for EventMachine.add_periodic_timer: "This method schedules execution of the given block repeatedly, at intervals of time at least as great as the number of seconds given in the first parameter to the call."

This suggested to me that the timer period value itself was not the most relevant or useful part of the value logged.

Open to suggestions and corrections on this though. I was scratching my own itch with this change.

postrank-labs member

Yeah, I see where you're coming from. The timer itself is not really the point here, it's just a tool to get at the data we need.. Perhaps I'm just splitting hairs over pedantic definitions. :)

Keep it as is.. but I would update the precision to be something more readable. microsecond level accuracy out to be enough for everyone. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment