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

Include milliseconds in log timestamps. #7163

Merged
merged 2 commits into from Jun 1, 2017

Conversation

Projects
None yet
3 participants
@jcsteh
Contributor

jcsteh commented May 10, 2017

This will make it possible to measure response time in logs. We almost always want things to respond faster than one second, so second granularity is useless for this purpose.

I used the technique suggested in this Stackoverflow answer.

Include milliseconds in log timestamps.
This will make it possible to measure response time in logs. We almost always want things to respond faster than one second, so second granularity is useless for this purpose.

@jcsteh jcsteh requested a review from feerrenrut May 10, 2017

@feerrenrut

Looks good, could you add an example of the output?

@jcsteh

This comment has been minimized.

Show comment
Hide comment
@jcsteh

jcsteh May 11, 2017

Contributor

Looks good, could you add an example of the output?

Did you mean as a code comment or just on this PR? Here's an example:

Without this PR:

IO - inputCore.InputManager.executeGesture (09:17:40):
Input: kb(desktop):v

With this PR:

IO - inputCore.InputManager.executeGesture (09:17:40.724):
Input: kb(desktop):v
Contributor

jcsteh commented May 11, 2017

Looks good, could you add an example of the output?

Did you mean as a code comment or just on this PR? Here's an example:

Without this PR:

IO - inputCore.InputManager.executeGesture (09:17:40):
Input: kb(desktop):v

With this PR:

IO - inputCore.InputManager.executeGesture (09:17:40.724):
Input: kb(desktop):v
@feerrenrut

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut May 12, 2017

Contributor

Great, thanks! I did just mean on this PR. But now that you mention it. It could be a useful comment in the code... except that it will likely get out of sync with the code. On the other hand, its probably not something that changes that often. I think I've come full circle, I think a code comment would be good, despite the risk that it gets out of sync with the code, it would make it much faster for someone reading this code to understand what the output would look like.

Contributor

feerrenrut commented May 12, 2017

Great, thanks! I did just mean on this PR. But now that you mention it. It could be a useful comment in the code... except that it will likely get out of sync with the code. On the other hand, its probably not something that changes that often. I think I've come full circle, I think a code comment would be good, despite the risk that it gets out of sync with the code, it would make it much faster for someone reading this code to understand what the output would look like.

@jcsteh jcsteh merged commit 72c82f7 into master Jun 1, 2017

@nvaccessAuto nvaccessAuto removed the incubating label Jun 1, 2017

@nvaccessAuto nvaccessAuto added this to the 2017.3 milestone Jun 1, 2017

@jcsteh jcsteh deleted the logMs branch Jun 1, 2017

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