Skip to content

Commit

Permalink
feat: reduce the number of samples in lifetimeTimer (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored May 28, 2024
1 parent 89ff451 commit 9f961dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 25 // Patch version component of the current release
VersionPatch = 26 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down
6 changes: 5 additions & 1 deletion rollup/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ var (
ErrApplyStageDone = errors.New("apply stage is done")
ErrUnexpectedL1MessageIndex = errors.New("unexpected L1 message index")

lifetimeTimer = metrics.NewRegisteredTimer("pipeline/lifetime", nil)
lifetimeTimer = func() metrics.Timer {
t := metrics.NewCustomTimer(metrics.NewHistogram(metrics.NewExpDecaySample(128, 0.015)), metrics.NewMeter())
metrics.DefaultRegistry.Register("pipeline/lifetime", t)
return t
}()
applyTimer = metrics.NewRegisteredTimer("pipeline/apply", nil)
applyIdleTimer = metrics.NewRegisteredTimer("pipeline/apply_idle", nil)
applyStallTimer = metrics.NewRegisteredTimer("pipeline/apply_stall", nil)
Expand Down

0 comments on commit 9f961dd

Please sign in to comment.