Regex captures benchmarks with or without CPU suffix.

This commit is contained in:
Brittany Walentin
2018-06-07 22:16:50 -07:00
parent 47abdc7385
commit b4d81a975b
6 changed files with 65 additions and 1 deletions

View File

@ -1174,6 +1174,44 @@ var testCases = []TestCase{
},
},
},
{
name: "28-bench-1cpu.txt",
reportName: "28-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "single/cpu",
Duration: 9467 * time.Millisecond,
Time: 9467,
Benchmarks: []*parser.Benchmark{
{
Name: "BenchmarkRing",
Duration: 74 * time.Nanosecond,
},
},
},
},
},
},
{
name: "29-bench-16cpu.txt",
reportName: "29-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "sixteen/cpu",
Duration: 1522 * time.Millisecond,
Time: 1522,
Benchmarks: []*parser.Benchmark{
{
Name: "BenchmarkRingaround",
Duration: 13571 * time.Nanosecond,
},
},
},
},
},
},
}
func TestParser(t *testing.T) {