Skip to content

Commit 2898510

Browse files
committed
Rename more instances of invalid save_blocks_block_count
Signed-off-by: bakhtin <a@bakhtin.net>
1 parent 2580304 commit 2898510

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

crates/storage/provider/src/providers/database/metrics.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub(crate) struct DatabaseProviderMetrics {
9090
/// Duration of `update_pipeline_stages` in `save_blocks`
9191
save_blocks_update_pipeline_stages: Histogram,
9292
/// Number of blocks per `save_blocks` call
93-
save_blocks_block_count: Histogram,
93+
save_blocks_batch_size: Histogram,
9494
/// Duration of MDBX commit in `save_blocks`
9595
save_blocks_commit_mdbx: Histogram,
9696
/// Duration of static file commit in `save_blocks`
@@ -118,7 +118,7 @@ pub(crate) struct DatabaseProviderMetrics {
118118
/// Last duration of `update_pipeline_stages` in `save_blocks`
119119
save_blocks_update_pipeline_stages_last: Gauge,
120120
/// Last number of blocks per `save_blocks` call
121-
save_blocks_block_count_last: Gauge,
121+
save_blocks_batch_size_last: Gauge,
122122
/// Last duration of MDBX commit in `save_blocks`
123123
save_blocks_commit_mdbx_last: Gauge,
124124
/// Last duration of static file commit in `save_blocks`
@@ -140,7 +140,7 @@ pub(crate) struct SaveBlocksTimings {
140140
pub write_trie_updates: Duration,
141141
pub update_history_indices: Duration,
142142
pub update_pipeline_stages: Duration,
143-
pub block_count: u64,
143+
pub batch_size: u64,
144144
}
145145

146146
/// Timings collected during a `commit` call.
@@ -182,7 +182,7 @@ impl DatabaseProviderMetrics {
182182
self.save_blocks_write_trie_updates.record(timings.write_trie_updates);
183183
self.save_blocks_update_history_indices.record(timings.update_history_indices);
184184
self.save_blocks_update_pipeline_stages.record(timings.update_pipeline_stages);
185-
self.save_blocks_block_count.record(timings.block_count as f64);
185+
self.save_blocks_batch_size.record(timings.batch_size as f64);
186186

187187
self.save_blocks_total_last.set(timings.total.as_secs_f64());
188188
self.save_blocks_mdbx_last.set(timings.mdbx.as_secs_f64());
@@ -196,7 +196,7 @@ impl DatabaseProviderMetrics {
196196
.set(timings.update_history_indices.as_secs_f64());
197197
self.save_blocks_update_pipeline_stages_last
198198
.set(timings.update_pipeline_stages.as_secs_f64());
199-
self.save_blocks_block_count_last.set(timings.block_count as f64);
199+
self.save_blocks_batch_size_last.set(timings.batch_size as f64);
200200
}
201201

202202
/// Records all commit timings.

crates/storage/provider/src/providers/database/provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ impl<TX: DbTx + DbTxMut + 'static, N: NodeTypesForProvider> DatabaseProvider<TX,
557557
nums
558558
};
559559

560-
let mut timings = metrics::SaveBlocksTimings { block_count, ..Default::default() };
560+
let mut timings = metrics::SaveBlocksTimings { batch_size: block_count, ..Default::default() };
561561

562562
// avoid capturing &self.tx in scope below.
563563
let sf_provider = &self.static_file_provider;

etc/grafana/dashboards/reth-persistence.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
"uid": "${datasource}"
670670
},
671671
"editorMode": "code",
672-
"expr": "avg(reth_storage_providers_database_save_blocks_block_count{$instance_label=\"$instance\", quantile=\"$quantile\"})",
672+
"expr": "avg(reth_storage_providers_database_save_blocks_batch_size{$instance_label=\"$instance\", quantile=\"$quantile\"})",
673673
"legendFormat": "Blocks per save_blocks call",
674674
"range": true,
675675
"refId": "A"
@@ -1309,7 +1309,7 @@
13091309
"uid": "${datasource}"
13101310
},
13111311
"editorMode": "code",
1312-
"expr": "avg(reth_storage_providers_database_save_blocks_block_count_last{$instance_label=\"$instance\"})",
1312+
"expr": "avg(reth_storage_providers_database_save_blocks_batch_size_last{$instance_label=\"$instance\"})",
13131313
"legendFormat": "Blocks per save_blocks call",
13141314
"range": true,
13151315
"refId": "A"

0 commit comments

Comments
 (0)