Conversation
7aec1b4 to
8044093
Compare
nfrisby
left a comment
There was a problem hiding this comment.
LGTM
My only experience with the counters was from implementing this commit January 9afc1e7
So I primarily just compared to that. The only difference I'm seeing is that this counter would not be maintained when the Mempool tracer is turned off. I think that's probably fine. (But happened to not be something we wanted for the January commit.)
I hesitate to Approve, only because I don't own this repository. But if someone who owns it feels comfortable to Approve based on this Comment, feel free.
| [ IntM "txsSyncDuration" (round $ 1000 * duration) | ||
| let durationMs = round (1000 * duration) :: Integer in | ||
| [ IntM "txsSyncDuration" durationMs | ||
| , CounterM txsSyncDurationTotalCounterName (Just (fromIntegral durationMs)) |
There was a problem hiding this comment.
For reference, I looked this up (for the nth time) just to check: Nothing is increment and Just n is +n
There was a problem hiding this comment.
EKG counters are integral. I think it's fine to round to milliseconds before contributing to the running total.
| atomicModifyIORef' (fsTxsProcessedNum fs) $ | ||
| \txCount -> join (,) $ f txCount | ||
|
|
||
| mapForgingStatsTxsSyncDuration :: |
There was a problem hiding this comment.
Matches mapForgingStatsTxsProcessed just above ✅
I implemented it like the |
jutaro
left a comment
There was a problem hiding this comment.
No findings.
The new txsSyncDurationTotal metric looks consistent with the existing tracing/metrics pattern, and the naming/help-text updates match the behavior. Residual risk: I did not see tests for the new counter, so runtime/exporter behavior should still be checked manually.
8044093 to
b087110
Compare
Add a txsSyncDurationTotal counter for tracking the total time spent syncing the mempool.
b087110 to
dd0eaf7
Compare
Description
Add a txsSyncDurationTotal counter for tracking the total time spent syncing the mempool.
Checklist
See Running tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.