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

Speed up logging #7

Closed
wants to merge 1 commit into from
Closed

Speed up logging #7

wants to merge 1 commit into from

Conversation

soluwalana
Copy link

When you are logging many requests, each call must perform as quickly as
possible, adding caching to the timestamp generation speeds it up a
little bit :)

When you are logging many requests, each call must perform as quickly as
possible, adding caching to the timestamp generation speeds it up a
little bit :)
@rmg
Copy link
Contributor

rmg commented Jul 17, 2015

It appears that under heavy load, all of the log messages printed in a 1 second period will have the same timestamp... Is that really acceptable for your application, @soluwalana?

@wood1986
Copy link
Owner

@rmg ask what I want to ask. Sorry @soluwalana, I cannot accept your change.

@wood1986 wood1986 closed this Jul 18, 2015
@soluwalana
Copy link
Author

My resolution for the logs didn't need MS precision, idea for the change was taken from NodeJS's library for HTTP server timestamps.
https://github.com/joyent/node/blob/master/lib/_http_outgoing.js L51.
So I just thought it may be useful to reuse the same technique here.

:)

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.

3 participants