Skip to content

Commit

Permalink
space retired metric added (#13454)
Browse files Browse the repository at this point in the history
closes #13233

Co-authored-by: JkLondon <[email protected]>
  • Loading branch information
JkLondon and JkLondon authored Jan 16, 2025
1 parent 5fcefc6 commit acb5eee
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/prometheus/dashboards/erigon_internals.json
Original file line number Diff line number Diff line change
Expand Up @@ -5727,6 +5727,18 @@
"legendFormat": "dirty: {{instance}}",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "tx_retired{instance=~\"$instance\"}",
"interval": "",
"legendFormat": "limit: {{instance}}",
"range": true,
"refId": "C"
}
],
"title": "Tx Size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5543,6 +5543,18 @@
"legendFormat": "dirty: {{instance}}",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "tx_retired{instance=~\"$instance\"}",
"interval": "",
"legendFormat": "limit: {{instance}}",
"range": true,
"refId": "C"
}
],
"title": "Tx Size",
Expand Down
1 change: 1 addition & 0 deletions erigon-lib/kv/kv_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ var (
TxSpill = metrics.GetOrCreateGauge(`tx_spill`) //nolint
TxUnspill = metrics.GetOrCreateGauge(`tx_unspill`) //nolint
TxDirty = metrics.GetOrCreateGauge(`tx_dirty`) //nolint
TxRetired = metrics.GetOrCreateGauge(`tx_retired`) //nolint

DbCommitPreparation = metrics.GetOrCreateSummary(`db_commit_seconds{phase="preparation"}`) //nolint
//DbGCWallClock = metrics.GetOrCreateSummary(`db_commit_seconds{phase="gc_wall_clock"}`) //nolint
Expand Down
1 change: 1 addition & 0 deletions erigon-lib/kv/mdbx/kv_mdbx.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ func (tx *MdbxTx) CollectMetrics() {
}

kv.TxDirty.SetUint64(txInfo.SpaceDirty)
kv.TxRetired.SetUint64(txInfo.SpaceRetired)
kv.TxLimit.SetUint64(tx.db.txSize)
kv.TxSpill.SetUint64(txInfo.Spill)
kv.TxUnspill.SetUint64(txInfo.Unspill)
Expand Down

0 comments on commit acb5eee

Please sign in to comment.