We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f83a0a commit e1d9306Copy full SHA for e1d9306
crates/signer/src/lib.rs
@@ -88,7 +88,7 @@ impl Signer {
88
let future = Box::pin(async move {
89
let now = Instant::now();
90
let res = sign_block(block, signer).await;
91
- metric.signing_duration.set(now.elapsed().as_secs_f64());
+ metric.signing_duration.record(now.elapsed().as_secs_f64());
92
res
93
});
94
self.in_progress.push_back(future);
crates/signer/src/metrics.rs
@@ -1,10 +1,10 @@
1
-use metrics::Gauge;
+use metrics::Histogram;
2
use metrics_derive::Metrics;
3
4
/// The metrics for the [`super::Signer`].
5
#[derive(Metrics, Clone)]
6
#[metrics(scope = "signer")]
7
pub struct SignerMetrics {
8
/// The signing duration.
9
- pub signing_duration: Gauge,
+ pub signing_duration: Histogram,
10
}
0 commit comments