forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add more state_transition, worker, and tracing metrics (#700)
* feat: add transactions len metrics of block processer * feat: (worker): add metrics * feat: add commitTransaction loops * feat: add metrics to rollup tracing * feat: add metrics to getTxResult * feat: bump version * add state revert metric timer * feat: add commitNewWrok metrics * feat: fix comments * feat: remove the consume part metrics * feat: update * Apply suggestions from code review Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> * feat: update * feat: address comments * chore: auto version bump [bot] * feat: bump version * add tests * Revert "add tests" This reverts commit 175d544. --------- Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> Co-authored-by: georgehao <georgehao@users.noreply.github.com> Co-authored-by: colinlyguo <colinlyguo@scroll.io>
- Loading branch information
1 parent
5115f13
commit 678a9fc
Showing
5 changed files
with
148 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package common | ||
|
||
import "github.com/scroll-tech/go-ethereum/metrics" | ||
|
||
// WithTimer calculates the interval of f | ||
func WithTimer(timer metrics.Timer, f func()) { | ||
if metrics.Enabled { | ||
timer.Time(f) | ||
} else { | ||
f() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.