mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 22:01:04 +00:00
metrics: Increase the resolution of histogram metrics (#7335)
* metrics: Increase the resolution of histogram metrics
These metrics are using the default histogram buckets:
```
pub const DEFAULT_BUCKETS: &[f64; 11] = &[
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
];
```
Which give us a resolution of 5ms, that's good, but there are some subsystems
where we process hundreds or even a few thousands of messages per second like
approval-voting or approval-distribution, so it makes sense to increse the
resoution of the bucket to better understand if the procesisng is in the range
of useconds.
The new bucket ranges will be:
```
[0.0001, 0.0004, 0.0016, 0.0064, 0.0256, 0.1024, 0.4096, 1.6384, 6.5536]
```
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
* Use buckets with higher resolution
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
---------
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
4f2c748c73
commit
ef6ae48508
@@ -134,14 +134,14 @@ impl MetricsTrait for Metrics {
|
|||||||
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
|
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
|
||||||
"polkadot_parachain_time_import_pending_now_known",
|
"polkadot_parachain_time_import_pending_now_known",
|
||||||
"Time spent on importing pending assignments and approvals.",
|
"Time spent on importing pending assignments and approvals.",
|
||||||
))?,
|
).buckets(vec![0.0001, 0.0004, 0.0016, 0.0064, 0.0256, 0.1024, 0.4096, 1.6384, 3.2768, 4.9152, 6.5536,]))?,
|
||||||
registry,
|
registry,
|
||||||
)?,
|
)?,
|
||||||
time_awaiting_approval_voting: prometheus::register(
|
time_awaiting_approval_voting: prometheus::register(
|
||||||
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
|
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
|
||||||
"polkadot_parachain_time_awaiting_approval_voting",
|
"polkadot_parachain_time_awaiting_approval_voting",
|
||||||
"Time spent awaiting a reply from the Approval Voting Subsystem.",
|
"Time spent awaiting a reply from the Approval Voting Subsystem.",
|
||||||
))?,
|
).buckets(vec![0.0001, 0.0004, 0.0016, 0.0064, 0.0256, 0.1024, 0.4096, 1.6384, 3.2768, 4.9152, 6.5536,]))?,
|
||||||
registry,
|
registry,
|
||||||
)?,
|
)?,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -165,7 +165,11 @@ impl MetricsTrait for Metrics {
|
|||||||
prometheus::HistogramOpts::new(
|
prometheus::HistogramOpts::new(
|
||||||
"polkadot_parachain_subsystem_bounded_tof",
|
"polkadot_parachain_subsystem_bounded_tof",
|
||||||
"Duration spent in a particular channel from entrance to removal",
|
"Duration spent in a particular channel from entrance to removal",
|
||||||
),
|
)
|
||||||
|
.buckets(vec![
|
||||||
|
0.0001, 0.0004, 0.0016, 0.0064, 0.0256, 0.1024, 0.4096, 1.6384, 3.2768,
|
||||||
|
4.9152, 6.5536,
|
||||||
|
]),
|
||||||
&["subsystem_name"],
|
&["subsystem_name"],
|
||||||
)?,
|
)?,
|
||||||
registry,
|
registry,
|
||||||
@@ -205,7 +209,11 @@ impl MetricsTrait for Metrics {
|
|||||||
prometheus::HistogramOpts::new(
|
prometheus::HistogramOpts::new(
|
||||||
"polkadot_parachain_subsystem_unbounded_tof",
|
"polkadot_parachain_subsystem_unbounded_tof",
|
||||||
"Duration spent in a particular channel from entrance to removal",
|
"Duration spent in a particular channel from entrance to removal",
|
||||||
),
|
)
|
||||||
|
.buckets(vec![
|
||||||
|
0.0001, 0.0004, 0.0016, 0.0064, 0.0256, 0.1024, 0.4096, 1.6384, 3.2768,
|
||||||
|
4.9152, 6.5536,
|
||||||
|
]),
|
||||||
&["subsystem_name"],
|
&["subsystem_name"],
|
||||||
)?,
|
)?,
|
||||||
registry,
|
registry,
|
||||||
|
|||||||
Reference in New Issue
Block a user