Adds multi-package benchmark support, simplifies merge benchmark averaging. Addressing code review comments.

This commit is contained in:
Brittany Walentin
2018-06-03 12:28:48 -07:00
parent 260b47cabe
commit 1c2c0a00fe
7 changed files with 67 additions and 151 deletions

View File

@ -1107,101 +1107,40 @@ var testCases = []TestCase{
report: &parser.Report{
Packages: []parser.Package{
{
Name: "multiple/repeating",
Duration: 14211 * time.Millisecond,
Time: 14211,
Tests: []*parser.Test{
{
Name: "TestRepeat",
Duration: 0,
Time: 0,
Result: parser.PASS,
},
{
Name: "TestRepeat",
Duration: 0,
Time: 0,
Result: parser.PASS,
},
{
Name: "TestRepeat",
Duration: 0,
Time: 0,
Result: parser.PASS,
},
{
Name: "TestRepeat",
Duration: 0,
Time: 0,
Result: parser.PASS,
},
{
Name: "TestRepeat",
Duration: 0,
Time: 0,
Result: parser.PASS,
},
},
Name: "mycode/common",
Duration: 7267 * time.Millisecond,
Time: 7267,
Benchmarks: []*parser.Benchmark{
{
Name: "BenchmarkNew",
Duration: 350 * time.Nanosecond,
Bytes: 80,
Allocs: 3,
Name: "BenchmarkParse",
Duration: 1591 * time.Nanosecond,
},
{
Name: "BenchmarkNew",
Duration: 357 * time.Nanosecond,
Bytes: 80,
Allocs: 3,
Name: "BenchmarkNewTask",
Duration: 391 * time.Nanosecond,
},
},
},
{
Name: "mycode/benchmarks/channels",
Duration: 47084 * time.Millisecond,
Time: 47084,
Benchmarks: []*parser.Benchmark{
{
Name: "BenchmarkFanout/Channel/10",
Duration: 4673 * time.Nanosecond,
},
{
Name: "BenchmarkNew",
Duration: 354 * time.Nanosecond,
Bytes: 80,
Allocs: 3,
Name: "BenchmarkFanout/Channel/100",
Duration: 24965 * time.Nanosecond,
},
{
Name: "BenchmarkNew",
Duration: 358 * time.Nanosecond,
Bytes: 80,
Allocs: 3,
Name: "BenchmarkFanout/Channel/1000",
Duration: 195672 * time.Nanosecond,
},
{
Name: "BenchmarkNew",
Duration: 345 * time.Nanosecond,
Bytes: 80,
Allocs: 3,
},
{
Name: "BenchmarkFew",
Duration: 100 * time.Nanosecond,
Bytes: 20,
Allocs: 1,
},
{
Name: "BenchmarkFew",
Duration: 105 * time.Nanosecond,
Bytes: 20,
Allocs: 1,
},
{
Name: "BenchmarkFew",
Duration: 102 * time.Nanosecond,
Bytes: 20,
Allocs: 1,
},
{
Name: "BenchmarkFew",
Duration: 102 * time.Nanosecond,
Bytes: 20,
Allocs: 1,
},
{
Name: "BenchmarkFew",
Duration: 102 * time.Nanosecond,
Bytes: 20,
Allocs: 1,
Name: "BenchmarkFanout/Channel/10000",
Duration: 2410200 * time.Nanosecond,
},
},
},