Repository navigation
Add ledger age histrogram to support "min block time" test - #5237
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ledger-close-interval histogram metric to support downstream “min block time” testing in supercluster.
Changes:
- Introduces
ledger.age.closed-histogramas a newmedida::Histogrammetric inLedgerManagerImpl. - Updates ledger apply path to record close-to-close duration into both the existing buckets metric and the new histogram (in milliseconds).
- Documents the new metric in
docs/metrics.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/ledger/LedgerManagerImpl.h |
Adds a medida::Histogram& member to track ledger age as a histogram. |
src/ledger/LedgerManagerImpl.cpp |
Registers the histogram and updates it during applyLedger() using close duration in ms. |
docs/metrics.md |
Adds documentation entry for ledger.age.closed-histogram. |
SirTyson
reviewed
Apr 21, 2026
SirTyson
left a comment
Contributor
There was a problem hiding this comment.
Is this necessary/redundant with leder.age.closed? I think this is the same as this query:
SirTyson
previously approved these changes
Apr 21, 2026
Contributor
Author
|
The other one splits ledger age into buckets (so separate histograms), which doesn't work for the min block test, as we want to collect all samples into a single histogram. I can put this one behind BUILD_TESTS though to avoid confusing prod metrics |
marta-lokhova
force-pushed
the
ledgerAgeHist
branch
from
April 21, 2026 20:49
d8aaec8 to
a4f23f6
Compare
dmkozh
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for stellar/supercluster#376