Skip to content

Commit

Permalink
add : metrics commitInterruptCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsharma committed Mar 14, 2023
1 parent 1462a39 commit 5e8b390
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const (
var (
sealedBlocksCounter = metrics.NewRegisteredCounter("worker/sealedBlocks", nil)
sealedEmptyBlocksCounter = metrics.NewRegisteredCounter("worker/sealedEmptyBlocks", nil)
commitInterruptCounter = metrics.NewRegisteredCounter("worker/commitInterrupt", nil)
)

// environment is the worker's current environment and holds all
Expand Down Expand Up @@ -970,6 +971,7 @@ mainloop:
// case of interrupting by timeout
select {
case <-interruptCh:
commitInterruptCounter.Inc(1)
break mainloop
default:
}
Expand Down

0 comments on commit 5e8b390

Please sign in to comment.