-
Notifications
You must be signed in to change notification settings - Fork 21.2k
core: state size metrics #32362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
core: state size metrics #32362
Conversation
b9f33e2
to
87e1d82
Compare
core/rawdb/accessors_metadata.go
Outdated
@@ -187,3 +187,16 @@ func WriteTransitionStatus(db ethdb.KeyValueWriter, data []byte) { | |||
log.Crit("Failed to store the eth2 transition status", "err", err) | |||
} | |||
} | |||
|
|||
// WriteStateSizeMetrics writes the state size metrics to the database | |||
func WriteStateSizeMetrics(db ethdb.KeyValueWriter, data []byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to persistent the state size into database.
I would prefer to only keep them in memory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, we need to iterate the db to calculate the init size for each restart, let me have a test how much time it needs to calculate the init size
would it be hard to also add receipts? @shazam8253 can do it otherwise. |
just curious, the receipts were stored mostly in freezer, should also be considered as state size? |
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
This reverts commit 87e1d82. Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
d99afda
to
6af49ca
Compare
Add 8 more metrics, each for different state category: