Skip to content

Commit 5677a0d

Browse files
authored
fix(l1): subtract DB read times from block execution. (#4051)
**Motivation** Be able to get the _net_ block execution, substracting the DB reads in Grafana. **Description** This is how it looks: <img width="577" height="297" alt="Screenshot 2025-08-14 at 13 24 56" src="https://github.com/user-attachments/assets/feb5d9fd-3dce-426e-8705-4049e5c2b98e" />
1 parent 72007d4 commit 5677a0d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

crates/storage/store.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ pub struct AccountUpdatesList {
7373
}
7474

7575
impl Store {
76-
#[instrument(level = "trace", name = "Block DB update", skip_all)]
7776
pub async fn store_block_updates(&self, update_batch: UpdateBatch) -> Result<(), StoreError> {
7877
self.engine.apply_updates(update_batch).await
7978
}

metrics/provisioning/grafana/dashboards/common_dashboards/ethrex_l1_perf.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,8 @@
943943
"targets": [
944944
{
945945
"disableTextWrap": false,
946-
"editorMode": "builder",
947-
"expr": "sum by(function_name) (function_duration_seconds_sum)",
946+
"editorMode": "code",
947+
"expr": "(\n sum by (function_name) (\n increase(function_duration_seconds_sum{function_name!=\"Block execution\"}[$__range])\n )\n)\nor\nlabel_replace(\n sum( increase(function_duration_seconds_sum{function_name=\"Block execution\"}[$__range]) )\n - sum( increase(function_duration_seconds_sum{function_name=~\"Storage read|Account read|Account Read\"}[$__range]) ),\n \"function_name\",\"Block execution (without db)\",\"__name__\",\".*\"\n)",
948948
"fullMetaSearch": false,
949949
"includeNullMetadata": false,
950950
"legendFormat": "__auto",

0 commit comments

Comments
 (0)