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

Convert more timing code to <chrono> #2237

Closed
wants to merge 1 commit into from

Conversation

HowardHinnant
Copy link
Contributor

  • LoadMonitor
  • Entry
  • Import

@codecov-io
Copy link

codecov-io commented Sep 29, 2017

Codecov Report

Merging #2237 into develop will decrease coverage by 0.02%.
The diff coverage is 97.53%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2237      +/-   ##
===========================================
- Coverage    70.11%   70.08%   -0.03%     
===========================================
  Files          689      689              
  Lines        50800    50800              
===========================================
- Hits         35617    35602      -15     
- Misses       15183    15198      +15
Impacted Files Coverage Δ
src/ripple/app/misc/impl/ValidatorSite.cpp 78.32% <100%> (ø) ⬆️
src/ripple/app/misc/ValidatorList.h 98.24% <100%> (-0.04%) ⬇️
src/ripple/shamap/impl/SHAMapSync.cpp 67.07% <100%> (ø) ⬆️
src/ripple/core/impl/JobQueue.cpp 87.32% <100%> (ø) ⬆️
src/ripple/resource/impl/Logic.h 53.27% <100%> (-4.51%) ⬇️
src/ripple/core/JobTypeInfo.h 100% <100%> (ø) ⬆️
src/ripple/core/JobTypes.h 98.3% <100%> (ø) ⬆️
src/ripple/basics/KeyCache.h 84.61% <100%> (ø) ⬆️
src/ripple/resource/impl/Import.h 100% <100%> (ø) ⬆️
src/ripple/app/misc/impl/ValidatorList.cpp 83.41% <100%> (+0.08%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cafe18c...3e874d3. Read the comment docs.

Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

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

👍 Left one nit, but no change needed if the nit doesn't bother you.


lastSample_ = ms;

if (ms.count() >= 10)
if (ms >= 10ms)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: We have a variable ms and a suffix ms, so we're seeing code like ms >= 10ms. The code is clear, however I it does seem a little weird. Maybe rename the ms variable?


if (ms.count() >= 10)
if (ms >= 10ms)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same nit here: we have both a var ms and a suffix ms

Copy link
Collaborator

@bachase bachase left a comment

Choose a reason for hiding this comment

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

👍

add( jtNS_ASYNC_READ, "AsyncReadNode", 0, true, 0, 0);
add( jtNS_WRITE, "WriteNode", 0, true, 0, 0);
add( jtPACK, "makeFetchPack", 1, false, 0ms, 0ms);
add( jtPUBOLDLEDGER, "publishAcqLedger", 2, false, 10000ms, 15000ms);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice readability improvement!

@HowardHinnant HowardHinnant added the Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. label Oct 2, 2017
@HowardHinnant
Copy link
Contributor Author

Rebased to 0.80.0 and squashed.

@bachase bachase added the Rebase label Nov 30, 2017
* LoadMonitor
* Entry
* Import
@HowardHinnant
Copy link
Contributor Author

Rebased to 0.80.1

@seelabs
Copy link
Collaborator

seelabs commented Dec 1, 2017

In 0.90.0-b1

@seelabs seelabs closed this Dec 1, 2017
@HowardHinnant HowardHinnant deleted the chrono_clean branch June 25, 2018 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants