mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-05 05:00:15 -05:00
junit: Improve benchmark total time calculation
This commit is contained in:
parent
969fc17b96
commit
84c3710523
@ -187,7 +187,7 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites {
|
||||
tc := Testcase{
|
||||
Classname: pkg.Name,
|
||||
Name: bm.Name,
|
||||
Time: formatBenchmarkTime(time.Duration(bm.NsPerOp)),
|
||||
Time: formatBenchmarkTime(time.Duration(bm.NsPerOp) * time.Duration(bm.Iterations)),
|
||||
}
|
||||
|
||||
if bm.Result == gtr.Fail {
|
||||
|
4
testdata/022-report.xml
vendored
4
testdata/022-report.xml
vendored
@ -4,8 +4,8 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkParse" classname="package/basic" time="0.000000604"></testcase>
|
||||
<testcase name="BenchmarkReadingList" classname="package/basic" time="0.000001425"></testcase>
|
||||
<testcase name="BenchmarkParse" classname="package/basic" time="1.208000000"></testcase>
|
||||
<testcase name="BenchmarkReadingList" classname="package/basic" time="1.425000000"></testcase>
|
||||
<system-out><![CDATA[goos: darwin
|
||||
goarch: amd64
|
||||
pkg: code.internal/state]]></system-out>
|
||||
|
4
testdata/023-report.xml
vendored
4
testdata/023-report.xml
vendored
@ -4,8 +4,8 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkIpsHistoryInsert" classname="package/one" time="0.000052568"></testcase>
|
||||
<testcase name="BenchmarkIpsHistoryLookup" classname="package/one" time="0.000015208"></testcase>
|
||||
<testcase name="BenchmarkIpsHistoryInsert" classname="package/one" time="1.577040000"></testcase>
|
||||
<testcase name="BenchmarkIpsHistoryLookup" classname="package/one" time="1.520800000"></testcase>
|
||||
<system-out><![CDATA[goos: darwin
|
||||
goarch: amd64
|
||||
pkg: code.internal/state]]></system-out>
|
||||
|
4
testdata/024-report.xml
vendored
4
testdata/024-report.xml
vendored
@ -8,7 +8,7 @@
|
||||
<testcase name="TestNew/no" classname="package3/baz" time="0.000"></testcase>
|
||||
<testcase name="TestNew/normal" classname="package3/baz" time="0.000"></testcase>
|
||||
<testcase name="TestWriteThis" classname="package3/baz" time="0.000"></testcase>
|
||||
<testcase name="BenchmarkDeepMerge" classname="package3/baz" time="0.000002611"></testcase>
|
||||
<testcase name="BenchmarkNext" classname="package3/baz" time="0.000000100"></testcase>
|
||||
<testcase name="BenchmarkDeepMerge" classname="package3/baz" time="1.305500000"></testcase>
|
||||
<testcase name="BenchmarkNext" classname="package3/baz" time="0.050000000"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
4
testdata/025-report.xml
vendored
4
testdata/025-report.xml
vendored
@ -4,7 +4,7 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkNew" classname="pkg/count" time="0.000000352"></testcase>
|
||||
<testcase name="BenchmarkFew" classname="pkg/count" time="0.000000102"></testcase>
|
||||
<testcase name="BenchmarkNew" classname="pkg/count" time="8.800000000"></testcase>
|
||||
<testcase name="BenchmarkFew" classname="pkg/count" time="2.550000000"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
12
testdata/026-report.xml
vendored
12
testdata/026-report.xml
vendored
@ -4,18 +4,18 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkParse" classname="mycode/common" time="0.000001591"></testcase>
|
||||
<testcase name="BenchmarkNewTask" classname="mycode/common" time="0.000000391"></testcase>
|
||||
<testcase name="BenchmarkParse" classname="mycode/common" time="1.591000000"></testcase>
|
||||
<testcase name="BenchmarkNewTask" classname="mycode/common" time="1.173000000"></testcase>
|
||||
<system-out><![CDATA[pkg: mycode/common]]></system-out>
|
||||
</testsuite>
|
||||
<testsuite name="mycode/benchmarks/channels" tests="4" failures="0" errors="0" hostname="hostname" time="47.084" timestamp="2022-01-01T00:00:00Z">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkFanout/Channel/10" classname="mycode/benchmarks/channels" time="0.000004673"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/100" classname="mycode/benchmarks/channels" time="0.000024965"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/1000" classname="mycode/benchmarks/channels" time="0.000195672"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/10000" classname="mycode/benchmarks/channels" time="0.002410200"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/10" classname="mycode/benchmarks/channels" time="2.336500000"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/100" classname="mycode/benchmarks/channels" time="1.248250000"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/1000" classname="mycode/benchmarks/channels" time="1.956720000"></testcase>
|
||||
<testcase name="BenchmarkFanout/Channel/10000" classname="mycode/benchmarks/channels" time="1.205100000"></testcase>
|
||||
<system-out><![CDATA[pkg: mycode/benchmarks/channels]]></system-out>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
4
testdata/027-report.xml
vendored
4
testdata/027-report.xml
vendored
@ -4,8 +4,8 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkItsy" classname="really/small" time="0.000000045"></testcase>
|
||||
<testcase name="BenchmarkTeeny" classname="really/small" time="0.000000002"></testcase>
|
||||
<testcase name="BenchmarkItsy" classname="really/small" time="1.350000000"></testcase>
|
||||
<testcase name="BenchmarkTeeny" classname="really/small" time="2.000000000"></testcase>
|
||||
<testcase name="BenchmarkWeeny" classname="really/small" time="0.000000000"></testcase>
|
||||
<system-out><![CDATA[goos: darwin
|
||||
goarch: amd64
|
||||
|
2
testdata/028-report.xml
vendored
2
testdata/028-report.xml
vendored
@ -4,7 +4,7 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkRing" classname="single/cpu" time="0.000000074"></testcase>
|
||||
<testcase name="BenchmarkRing" classname="single/cpu" time="1.480000000"></testcase>
|
||||
<system-out><![CDATA[pkg: single/cpu]]></system-out>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
2
testdata/029-report.xml
vendored
2
testdata/029-report.xml
vendored
@ -4,7 +4,7 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkRingaround" classname="sixteen/cpu" time="0.000013571"></testcase>
|
||||
<testcase name="BenchmarkRingaround" classname="sixteen/cpu" time="1.357100000"></testcase>
|
||||
<system-out><![CDATA[pkg: sixteen/cpu]]></system-out>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
4
testdata/033-report.xml
vendored
4
testdata/033-report.xml
vendored
@ -4,8 +4,8 @@
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase name="BenchmarkDecode/Digits/Huffman/1e4" classname="compress/flate" time="0.000104427"></testcase>
|
||||
<testcase name="BenchmarkEncode/Digits/Huffman/1e4" classname="compress/flate" time="0.000028334"></testcase>
|
||||
<testcase name="BenchmarkDecode/Digits/Huffman/1e4" classname="compress/flate" time="1.044270000"></testcase>
|
||||
<testcase name="BenchmarkEncode/Digits/Huffman/1e4" classname="compress/flate" time="1.416700000"></testcase>
|
||||
<system-out><![CDATA[goos: linux
|
||||
goarch: amd64
|
||||
pkg: compress/flate]]></system-out>
|
||||
|
Loading…
x
Reference in New Issue
Block a user