gtr,junit: Move Benchmark duration calculation to gtr package

This commit is contained in:
Joël Stemmer
2022-06-12 22:54:12 +01:00
parent cb055227b7
commit 9a1666d75c
2 changed files with 7 additions and 1 deletions

View File

@ -235,7 +235,7 @@ func createTestcaseForBenchmark(pkgName string, bm gtr.Benchmark) Testcase {
tc := Testcase{
Classname: pkgName,
Name: bm.Name,
Time: formatBenchmarkTime(time.Duration(bm.NsPerOp) * time.Duration(bm.Iterations)),
Time: formatBenchmarkTime(bm.ApproximateDuration()),
}
if bm.Result == gtr.Fail {