Skip to content

Commit

Permalink
[State Sync] Increase various latency buckets.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind committed Sep 22, 2023
1 parent bb4f70b commit 0af67fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 4 additions & 3 deletions state-sync/aptos-data-client/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ pub static ERROR_RESPONSES: Lazy<IntCounterVec> = Lazy::new(|| {
});

// Latency buckets for network latencies (seconds)
const REQUEST_LATENCY_BUCKETS_SECS: [f64; 18] = [
const REQUEST_LATENCY_BUCKETS_SECS: &[f64] = &[
0.05, 0.1, 0.2, 0.3, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 5.0, 7.5, 10.0, 15.0, 20.0, 30.0, 40.0,
60.0,
60.0, 120.0, 180.0, 240.0, 300.0,
];

/// Counter for tracking request latencies
Expand Down Expand Up @@ -116,9 +116,10 @@ pub static OPTIMAL_CHUNK_SIZES: Lazy<IntGaugeVec> = Lazy::new(|| {

// Latency buckets for the sync latencies (seconds). Note: there are a
// lot of buckets here because we really care about sync latencies.
const SYNC_LATENCY_BUCKETS_SECS: [f64; 36] = [
const SYNC_LATENCY_BUCKETS_SECS: &[f64] = &[
0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8,
1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 3.0, 5.0, 10.0, 15.0, 20.0, 30.0, 40.0, 60.0, 120.0, 180.0,
240.0, 300.0, 360.0, 420.0, 480.0, 540.0, 600.0, 1200.0, 1800.0,
];

/// Counter for tracking various sync latencies
Expand Down
9 changes: 8 additions & 1 deletion state-sync/state-sync-driver/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,19 @@ pub static STORAGE_SYNCHRONIZER_GAUGES: Lazy<IntGaugeVec> = Lazy::new(|| {
.unwrap()
});

// Latency buckets for storage synchronizer operations
const STORAGE_SYNCHRONIZER_LATENCY_BUCKETS_SECS: &[f64] = &[
0.05, 0.1, 0.2, 0.3, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 5.0, 7.5, 10.0, 15.0, 20.0, 30.0, 40.0,
60.0, 120.0, 180.0, 240.0, 300.0,
];

/// Counter for tracking storage synchronizer latencies
pub static STORAGE_SYNCHRONIZER_LATENCIES: Lazy<HistogramVec> = Lazy::new(|| {
register_histogram_vec!(
"aptos_state_sync_storage_synchronizer_latencies",
"Counters related to the storage synchronizer latencies",
&["label"]
&["label"],
STORAGE_SYNCHRONIZER_LATENCY_BUCKETS_SECS.to_vec()
)
.unwrap()
});
Expand Down

0 comments on commit 0af67fa

Please sign in to comment.