Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add more granularity to prometheus histogram buckets (#6348)
Browse files Browse the repository at this point in the history
* Add buckets below 5ms

* Add more specific histogram buckets

* Add more specific buckets

* cargo fmt
  • Loading branch information
bredamatt committed Nov 28, 2022
1 parent 8549b37 commit 728acfb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
14 changes: 10 additions & 4 deletions node/core/av-store/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,16 @@ impl metrics::Metrics for Metrics {
registry,
)?,
get_chunk: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"polkadot_parachain_av_store_get_chunk",
"Time spent fetching requested chunks.`",
))?,
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"polkadot_parachain_av_store_get_chunk",
"Time spent fetching requested chunks.`",
)
.buckets(vec![
0.000625, 0.00125, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25,
0.5, 1.0, 2.5, 5.0, 10.0,
]),
)?,
registry,
)?,
};
Expand Down
14 changes: 10 additions & 4 deletions node/core/bitfield-signing/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ impl metrics::Metrics for Metrics {
registry,
)?,
run: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"polkadot_parachain_bitfield_signing_run",
"Time spent within `bitfield_signing::run`",
))?,
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"polkadot_parachain_bitfield_signing_run",
"Time spent within `bitfield_signing::run`",
)
.buckets(vec![
0.000625, 0.00125, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25,
0.5, 1.0, 2.5, 5.0, 10.0,
]),
)?,
registry,
)?,
};
Expand Down
2 changes: 1 addition & 1 deletion node/network/approval-distribution/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl MetricsTrait for Metrics {
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"polkadot_parachain_time_unify_with_peer",
"Time spent within fn `unify_with_peer`.",
))?,
).buckets(vec![0.000625, 0.00125,0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,]))?,
registry,
)?,
time_import_pending_now_known: prometheus::register(
Expand Down

0 comments on commit 728acfb

Please sign in to comment.