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
1441 - Add Time in Place to Transform History #668
base: main
Are you sure you want to change the base?
1441 - Add Time in Place to Transform History #668
Conversation
I ran across the post about configuring performance metrics.
|
Oh yeah, that's not a bad way to do it! Did you read the other post on that thread though about the cost of calling System.nanoTime() versus the cost of concatenating a number to a string and performing I/O operations? I thought that was interesting. Also, my next hurdle is figuring out a good way to let the user turn timing on and off. An environment variable seems like the obvious solution so that it could be turned on and off without having to restart the server or anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good starting point. Definitely needs support for toggling on/off.
sb.append(" "); | ||
if (h.wasCoordinated()) { | ||
sb.append(" "); | ||
} | ||
// check is NO_URL or not | ||
sb.append(" ").append(historyCase.equals(NO_URL) ? h.getKeyNoUrl() : h.getKey()).append("\n"); | ||
sb.append(" ").append(historyCase.equals(NO_URL) ? h.getKeyNoUrl() : h.getKey()).append(" Time: ") | ||
.append(msInPlace).append("ms") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably want to specify a format for the raw msInPlace
value to constrain the number of decimal places. I'm seeing values such as these, and those last digits are insignificant:
1.295251ms
1.370848ms
79.253002ms
0.338698ms
0.540692ms
4.128181ms
First working draft, no logic as of yet to enable/disable.