Tweak benchmark code

This commit is contained in:
akp 2021-12-08 22:51:18 +00:00
parent d4b1578abf
commit 8c30110e64
No known key found for this signature in database
GPG key ID: AA5726202C8879B7

View file

@ -145,12 +145,6 @@ func benchmarkImplementation(implementation string, dir string, inputString stri
} }
fmt.Println() fmt.Println()
pb = progressbar.NewOptions(
len(results) + 1, // two parts means 2x the number of runs
progressbar.OptionSetDescription(
fmt.Sprintf("Processing %s results", runners.RunnerNames[implementation]),
),
)
var ( var (
p1, p2 []float64 p1, p2 []float64
@ -164,12 +158,8 @@ func benchmarkImplementation(implementation string, dir string, inputString stri
} else if strings.HasPrefix(result.TaskID, p2id) { } else if strings.HasPrefix(result.TaskID, p2id) {
p2 = append(p2, result.Duration) p2 = append(p2, result.Duration)
} }
_ = pb.Add(1)
} }
_ = pb.Finish()
fmt.Println()
if cleanup != nil { if cleanup != nil {
cleanup() cleanup()
} }