feat: track epoch transition steps time in metrics#6143
feat: track epoch transition steps time in metrics#6143wemeetagain merged 7 commits intounstablefrom
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
|
Definitely not necessary to track every single step. Some functions are extremely cheap to run, just track the ones that do complex expensive logic, look at the benchmarks for reference |
5f6333e to
bc34818
Compare
| throw new Error("Lodestar does not support this network, parameters don't fit number value inside state.slashings"); | ||
| } | ||
|
|
||
| let timer = metrics?.epochTransitionStepTime.startTimer({step: "processJustificationAndFinalization"}); |
There was a problem hiding this comment.
I don't think it's necessary to use a let here, just declare individual variables. You only need to register labels once
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #6143 +/- ##
=============================================
+ Coverage 0 90.35% +90.35%
=============================================
Files 0 78 +78
Lines 0 8089 +8089
Branches 0 490 +490
=============================================
+ Hits 0 7309 +7309
- Misses 0 772 +772
- Partials 0 8 +8 |
|
|
||
| processJustificationAndFinalization(state, cache); | ||
| { | ||
| const timer = metrics?.epochTransitionStepTime.startTimer({ |
There was a problem hiding this comment.
would it make sense to have a metric utility function withTimer which just does the instrumentation? could refactor in a separate PR
|
🎉 This PR is included in v1.13.0 🎉 |
Motivation
We have unstable epoch transitions and we have no idea which steps take the most time
Description
part of #6112
part of #6063
part of #5409