Navigation Menu

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

Include milliseconds in log timestamps. #7163

Merged
merged 2 commits into from Jun 1, 2017
Merged

Include milliseconds in log timestamps. #7163

merged 2 commits into from Jun 1, 2017

Conversation

jcsteh
Copy link
Contributor

@jcsteh 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.

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 00:09
Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jcsteh
Copy link
Contributor Author

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
Copy link
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.

@jcsteh jcsteh merged commit 72c82f7 into master Jun 1, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.3 milestone Jun 1, 2017
@jcsteh jcsteh deleted the logMs branch June 1, 2017 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants