build(deps): bump github.com/go-critic/go-critic from 0.5.6 to 0.6.0 (#2041)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2021-10-23 00:51:11 +02:00 committed by GitHub
parent 6edca924d3
commit 4ce9a19e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 33 additions and 27 deletions

View file

@ -15,10 +15,10 @@ const noStagesText = "no stages"
type Stopwatch struct {
name string
startedAt time.Time
stages map[string]time.Duration
log logutils.Log
sync.Mutex
stages map[string]time.Duration
mu sync.Mutex
}
func NewStopwatch(name string, log logutils.Log) *Stopwatch {
@ -110,7 +110,7 @@ func (s *Stopwatch) TrackStage(name string, f func()) {
startedAt := time.Now()
f()
s.Lock()
s.mu.Lock()
s.stages[name] += time.Since(startedAt)
s.Unlock()
s.mu.Unlock()
}