Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
freemanzMrojo committed Jan 10, 2025
1 parent 0e50430 commit f3cebdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/thor/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ func (n *Node) txStashLoop(ctx context.Context) {

// guardBlockProcessing adds lock on block processing and maintains block conflicts.
func (n *Node) guardBlockProcessing(blockNum uint32, process func(conflicts uint32) error) error {
startTime := mclock.Now()
n.processLock.Lock()
startTime := mclock.Now()
metricBlockProcessingLockCount().AddWithLabel(1, map[string]string{"type": "acquired"})
defer func() {
n.processLock.Unlock()
metricBlockProcessingLockCount().AddWithLabel(1, map[string]string{"type": "released"})
lockElapsed := mclock.Now() - startTime
metricBlockProcessingLockCount().AddWithLabel(1, map[string]string{"type": "released"})
metricBlockProcessingLockDuration().Observe(time.Duration(lockElapsed).Milliseconds())
}()

Expand Down

0 comments on commit f3cebdd

Please sign in to comment.