diff --git a/crates/optimism/trie/src/prune/error.rs b/crates/optimism/trie/src/prune/error.rs index 86ab311d411..6c525b6ad54 100644 --- a/crates/optimism/trie/src/prune/error.rs +++ b/crates/optimism/trie/src/prune/error.rs @@ -16,10 +16,6 @@ pub type OpProofStoragePrunerResult = Result; pub struct PrunerOutput { /// Total elapsed wall time for this run (fetch + apply). pub duration: Duration, - /// Time elapsed during the stat diff fetch phase(non-blocking). - pub fetch_duration: Duration, - /// Time elapsed during the prune phase. - pub prune_duration: Duration, /// Earliest block at the start of the run. pub start_block: u64, /// New earliest block at the end of the run. @@ -51,8 +47,6 @@ impl PrunerOutput { /// extend the current [`PrunerOutput`] with another [`PrunerOutput`] pub fn extend_ref(&mut self, other: Self) { self.duration += other.duration; - self.fetch_duration += other.fetch_duration; - self.prune_duration += other.prune_duration; // take the earliest start block if self.start_block > other.start_block { self.start_block = other.start_block; @@ -91,8 +85,6 @@ mod tests { fn test_pruner_output_display() { let pruner_output = PrunerOutput { duration: Duration::from_secs(10), - fetch_duration: Duration::from_secs(5), - prune_duration: Duration::from_secs(5), start_block: 1, end_block: 2, write_counts: WriteCounts::new(1, 2, 3, 4), diff --git a/crates/optimism/trie/src/prune/metrics.rs b/crates/optimism/trie/src/prune/metrics.rs index dba8962a0d2..565f3ac9842 100644 --- a/crates/optimism/trie/src/prune/metrics.rs +++ b/crates/optimism/trie/src/prune/metrics.rs @@ -9,10 +9,6 @@ use reth_metrics::{ pub(crate) struct Metrics { /// Pruning duration pub(crate) total_duration_seconds: Histogram, - /// Duration spent fetching state diffs (non-blocking) - pub(crate) state_diff_fetch_duration_seconds: Histogram, - /// Duration spent pruning - pub(crate) prune_duration_seconds: Histogram, /// Number of pruned blocks pub(crate) pruned_blocks: Gauge, /// Number of account trie updates written in the prune run @@ -30,8 +26,6 @@ impl Metrics { let blocks_pruned = result.end_block - result.start_block; if blocks_pruned > 0 { self.total_duration_seconds.record(result.duration.as_secs_f64()); - self.state_diff_fetch_duration_seconds.record(result.fetch_duration.as_secs_f64()); - self.prune_duration_seconds.record(result.prune_duration.as_secs_f64()); self.pruned_blocks.set(blocks_pruned as f64); // Consume write counts diff --git a/crates/optimism/trie/src/prune/pruner.rs b/crates/optimism/trie/src/prune/pruner.rs index 3425da8fce0..c8d5c0298da 100644 --- a/crates/optimism/trie/src/prune/pruner.rs +++ b/crates/optimism/trie/src/prune/pruner.rs @@ -143,7 +143,7 @@ where })? .ok_or(PrunerError::BlockNotFound(parent_block_num))?; - let fetch_duration = batch_start_time.elapsed(); + batch_start_time.elapsed(); let block_with_parent = BlockWithParent { parent: parent_block_hash, @@ -154,14 +154,7 @@ where let write_counts = self.provider.prune_earliest_state(block_with_parent).await?; let duration = batch_start_time.elapsed(); - let batch_output = PrunerOutput { - duration, - fetch_duration, - prune_duration: duration.saturating_sub(fetch_duration), - start_block, - end_block, - write_counts, - }; + let batch_output = PrunerOutput { duration, start_block, end_block, write_counts }; // Record metrics for this batch #[cfg(feature = "metrics")] diff --git a/etc/grafana/dashboards/op-proof-history.json b/etc/grafana/dashboards/op-proof-history.json index 7d295851109..0f5cfaff5bf 100644 --- a/etc/grafana/dashboards/op-proof-history.json +++ b/etc/grafana/dashboards/op-proof-history.json @@ -1944,30 +1944,6 @@ }, "pluginVersion": "12.3.0", "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "rate(reth_optimism_trie_pruner_prune_duration_seconds_sum[$__rate_interval])/rate(reth_optimism_trie_pruner_prune_duration_seconds_count[$__rate_interval])", - "legendFormat": "Prune Duration", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "rate(reth_optimism_trie_pruner_state_diff_fetch_duration_seconds_sum[$__rate_interval])/rate(reth_optimism_trie_pruner_state_diff_fetch_duration_seconds_count[$__rate_interval])\n", - "hide": false, - "instant": false, - "legendFormat": "State Diff Fetch Duration", - "range": true, - "refId": "B" - }, { "datasource": { "type": "prometheus", @@ -1979,7 +1955,7 @@ "instant": false, "legendFormat": "Total Duration", "range": true, - "refId": "C" + "refId": "A" } ], "title": "Prune Duration Over Time",