Skip to content

Add ledger age histrogram to support "min block time" test - #5237

Merged
marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:ledgerAgeHist
Apr 21, 2026
Merged

marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:ledgerAgeHist

Conversation

@marta-lokhova

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings April 20, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-histogram as a new medida::Histogram metric in LedgerManagerImpl.
  • 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.

Comment thread src/ledger/LedgerManagerImpl.cpp Resolved
Comment thread docs/metrics.md Resolved

@SirTyson SirTyson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SirTyson
SirTyson previously approved these changes Apr 21, 2026
@marta-lokhova

Copy link
Copy Markdown
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
marta-lokhova added this pull request to the merge queue Apr 21, 2026
Merged via the queue into stellar:master with commit 15edb2d Apr 21, 2026
53 checks passed
@marta-lokhova
marta-lokhova deleted the ledgerAgeHist branch April 21, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants