mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
Fill README section about performance
This commit is contained in:
parent
3c2ca7b7c9
commit
ab0ce75c06
8 changed files with 157 additions and 63 deletions
|
@ -61,7 +61,11 @@ func (s *Stopwatch) Print() {
|
|||
}
|
||||
|
||||
func (s *Stopwatch) PrintStages() {
|
||||
logrus.Infof("%s %s", s.name, s.sprintStages())
|
||||
var stagesDuration time.Duration
|
||||
for _, s := range s.stages {
|
||||
stagesDuration += s
|
||||
}
|
||||
logrus.Infof("%s took %s with %s", s.name, stagesDuration, s.sprintStages())
|
||||
}
|
||||
|
||||
func (s *Stopwatch) TrackStage(name string, f func()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue