Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
4933: Metrics timings r=EdHastingsCasperAssociation a=darthsiroftardis

Update the histogram timings for the metrics

Closes casper-network#3770 


Co-authored-by: Karan Dhareshwar <[email protected]>
  • Loading branch information
2 parents a30c646 + 2c9c08f commit 43209a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions node/src/components/block_synchronizer/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const FWD_SYNC_DURATION_HELP: &str = "duration (in sec) to synchronize a forward

// We use exponential buckets to observe the time it takes to synchronize blocks.
// Coverage is ~7.7s with higher resolution in the first buckets.
const EXPONENTIAL_BUCKET_START: f64 = 0.05;
const EXPONENTIAL_BUCKET_FACTOR: f64 = 1.75;
const EXPONENTIAL_BUCKET_START: f64 = 0.2;
const EXPONENTIAL_BUCKET_FACTOR: f64 = 2.0;
const EXPONENTIAL_BUCKET_COUNT: usize = 10;

/// Metrics for the block synchronizer component.
Expand Down
2 changes: 1 addition & 1 deletion node/src/components/contract_runtime/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use prometheus::{self, Gauge, Histogram, IntGauge, Registry};
use crate::{unregister_metric, utils};

/// Value of upper bound of histogram.
const EXPONENTIAL_BUCKET_START: f64 = 0.01;
const EXPONENTIAL_BUCKET_START: f64 = 0.2;

/// Multiplier of previous upper bound for next bound.
const EXPONENTIAL_BUCKET_FACTOR: f64 = 2.0;
Expand Down
2 changes: 1 addition & 1 deletion node/src/reactor/main_reactor/memory_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl MemoryMetrics {
"time in seconds to estimate memory usage",
)
// Create buckets from one nanosecond to eight seconds.
.buckets(prometheus::exponential_buckets(0.000_000_004, 2.0, 32)?),
.buckets(prometheus::exponential_buckets(0.000_4, 2.0, 13)?),
)?;

registry.register(Box::new(mem_total.clone()))?;
Expand Down

0 comments on commit 43209a1

Please sign in to comment.