[SERVER-8839] TimerStats should track micros Created: 04/Mar/13 Updated: 10/May/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | PM-733, metrics, move-sa, stats | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Repl 2017-02-13 |
| Participants: |
| Description |
|
Update TimerStats and TimerHolder to track/expose microseconds |
| Comments |
| Comment by Steven Vannelli [ 10/May/22 ] |
|
Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions. |
| Comment by Santiago Alessandri [ 17/Oct/15 ] |
|
I fixed the test to use the durationCount function. I also made the TimerStats::recordDuration function use durationCount. I formatted every file I changed using the clang-formatter. Regarding when the PR gets merged, no problem at all. |
| Comment by Scott Hernandez (Inactive) [ 16/Oct/15 ] |
|
Santiago, The changed look good with only a very minor change to conform to the style guide and best practices when working with durations – I've added that one comment to the pull request. Here are the docs on the style guide and linter: https://www.mongodb.org/about/contributors/reference/server-code-style/#clang-format If you run "scons lint" it will tell you exactly what to change, and how. Personally, I have setup my editor to run clang-format when I save files so I just never think about it anymore, which is pretty nice. As we are working to finalize our upcoming 3.2 release, and already into our RC (release candidate) phase, we will most likely wait until we fork to the next development release/branch before merging this change since it isn't a bug nor stability improvement. I hope you understand and we appreciate the code contribution and you working to improve the server. --Scott |
| Comment by Ramon Fernandez Marina [ 13/Oct/15 ] |
|
Thanks for the updated pull request salessandri. I'm running your changes through our internal testing, will post an update on this ticket when the testing is done. |
| Comment by Santiago Alessandri [ 10/Oct/15 ] |
|
Updated the pull request, now using the Microsecond duration class. I still left the counter as an atomic integer, I didn't change it because I don't know whether we need thread safety or not and the atomic<duration> doesn't have the fetch_add method because duration is not an Integral type. One good idea would be to add the functionality for the Timer class to return a duration and not be forced to work with integral types when using it. |
| Comment by Santiago Alessandri [ 09/Oct/15 ] |
|
I just made the pull-request so you can comment on it. I think it is a lot better to move to chrono types, I'll apply the changes later and let you know. |
| Comment by Scott Hernandez (Inactive) [ 09/Oct/15 ] |
|
Santiago, I just saw that you didn't actually issue a pull request but just posted a diff/comparison which I can't easily comment on. Would you mind changing types from long long to Microseconds and creating a pull request to move forward? Thanks in advance, |
| Comment by Scott Hernandez (Inactive) [ 09/Oct/15 ] |
|
Santiago, Thanks for the pull request; I'll add comments to it for specifics. We have been moving towards using chrono types, like mongo::Microseconds, so I'll be asking for those instead of long/int. |
| Comment by Santiago Alessandri [ 07/Oct/15 ] |
|
I started implementing this, as it seems a pretty simple improvement while I start getting to know the codebase. You can see what I've done in the SERVER-8839 branch of my fork. I kept the milliseconds interface, although I don't know if that's useful or not. Couple of comments/questions:
|