Skip to content

Commit

Permalink
Fix metrics labeling issue (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 authored Apr 12, 2024
1 parent 5e8e9a2 commit f49d0f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion internal/consensus/metrics.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/consensus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ type Metrics struct {
CompleteProposalTime metrics.Histogram

// ApplyBlockLatency measures how long it takes to execute ApplyBlock in finalize commit step
ApplyBlockLatency metrics.Histogram `metrics_labels:"apply_block_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
ApplyBlockLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
}

// RecordConsMetrics uses for recording the block related metrics during fast-sync.
Expand Down
10 changes: 5 additions & 5 deletions internal/state/metrics.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions internal/state/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ type Metrics struct {
UpdateMempoolTime metrics.Histogram

// FinalizeBlockLatency measures how long it takes to run abci FinalizeBlock
FinalizeBlockLatency metrics.Histogram `metrics_labels:"finalize_blocks_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
FinalizeBlockLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`

// SaveBlockResponseLatency measures how long it takes to run save the FinalizeBlockRes
SaveBlockResponseLatency metrics.Histogram `metrics_labels:"save_block_response_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
SaveBlockResponseLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`

// SaveBlockLatency measure how long it takes to save the block
SaveBlockLatency metrics.Histogram `metrics_labels:"save_block_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
SaveBlockLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`

// PruneBlockLatency measures how long it takes to prune block from blockstore
PruneBlockLatency metrics.Histogram `metrics_labels:"prune_block_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
PruneBlockLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`

// FireEventsLatency measures how long it takes to fire events for indexing
FireEventsLatency metrics.Histogram `metrics_labels:"prune_block_ms" metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
FireEventsLatency metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
}

0 comments on commit f49d0f6

Please sign in to comment.