Skip to content

Commit

Permalink
cmd/benchstat: update golden testdata to match current behavior
Browse files Browse the repository at this point in the history
Change-Id: I268e3731b51b2c7cb327fc47913058490c439d6a
Reviewed-on: https://go-review.googlesource.com/36610
Run-TryBot: Quentin Smith <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
quentinmit committed Feb 8, 2017
1 parent 4fdefc0 commit c133759
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions cmd/benchstat/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestGolden(t *testing.T) {
func check(t *testing.T, name string, files ...string) {
t.Run(name, func(t *testing.T) {
os.Args = append([]string{"benchstat"}, files...)
t.Logf("running %v", os.Args)
r, w, err := os.Pipe()
if err != nil {
t.Fatal(err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/benchstat/testdata/examplehtml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
.benchstat .worse td.delta { font-weight: bold; color: #c00; }
</style>


<table class='benchstat oldnew'>
<tr class='configs'><th><th>exampleold.txt<th>examplenew.txt


<tbody>
<tr><th><th>old time/op<th>new time/op<th>delta<th>
<tr><th><th colspan='2' class='metric'>time/op<th>delta
<tr class='better'><td>GobEncode<td>13.6ms ± 1%<td>11.8ms ± 1%<td class='delta'>−13.31%<td class='note'>(p=0.016 n=4&#43;5)
<tr class='unchanged'><td>JSONEncode<td>32.1ms ± 1%<td>31.8ms ± 1%<td class='nodelta'>~<td class='note'>(p=0.286 n=4&#43;5)
<tr><td>&nbsp;
</tbody>

<tbody>
<tr><th><th>old speed<th>new speed<th>delta<th>
<tr><th><th colspan='2' class='metric'>speed<th>delta
<tr class='better'><td>GobEncode<td>56.4MB/s ± 1%<td>65.1MB/s ± 1%<td class='delta'>&#43;15.36%<td class='note'>(p=0.016 n=4&#43;5)
<tr class='unchanged'><td>JSONEncode<td>60.4MB/s ± 1%<td>61.1MB/s ± 2%<td class='nodelta'>~<td class='note'>(p=0.286 n=4&#43;5)
<tr><td>&nbsp;
Expand Down
1 change: 0 additions & 1 deletion cmd/benchstat/testdata/exampleoldhtml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.benchstat .worse td.delta { font-weight: bold; color: #c00; }
</style>


<table class='benchstat '>


Expand Down
1 change: 0 additions & 1 deletion cmd/benchstat/testdata/oldnew4html.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.benchstat .worse td.delta { font-weight: bold; color: #c00; }
</style>


<table class='benchstat '>
<tr class='configs'><th><th>old.txt<th>new.txt<th>slashslash4.txt

Expand Down
6 changes: 3 additions & 3 deletions cmd/benchstat/testdata/oldnewhtml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
.benchstat .worse td.delta { font-weight: bold; color: #c00; }
</style>


<table class='benchstat oldnew'>
<tr class='configs'><th><th>old.txt<th>new.txt


<tbody>
<tr><th><th>old time/op<th>new time/op<th>delta<th>
<tr><th><th colspan='2' class='metric'>time/op<th>delta
<tr class='better'><td>CRC32/poly=IEEE/size=15/align=0-8<td>46.9ns ± 8%<td>44.5ns ± 3%<td class='delta'>−5.01%<td class='note'>(p=0.008 n=10&#43;10)
<tr class='unchanged'><td>CRC32/poly=IEEE/size=15/align=1-8<td>44.7ns ± 5%<td>44.5ns ± 4%<td class='nodelta'>~<td class='note'>(p=0.539 n=10&#43;10)
<tr class='worse'><td>CRC32/poly=IEEE/size=40/align=0-8<td>41.0ns ± 1%<td>42.5ns ± 6%<td class='delta'>&#43;3.56%<td class='note'>(p=0.000 n=8&#43;10)
Expand Down Expand Up @@ -54,7 +54,7 @@
</tbody>

<tbody>
<tr><th><th>old speed<th>new speed<th>delta<th>
<tr><th><th colspan='2' class='metric'>speed<th>delta
<tr class='better'><td>CRC32/poly=IEEE/size=15/align=0-8<td>321MB/s ± 8%<td>337MB/s ± 3%<td class='delta'>&#43;5.06%<td class='note'>(p=0.009 n=10&#43;10)
<tr class='unchanged'><td>CRC32/poly=IEEE/size=15/align=1-8<td>336MB/s ± 4%<td>337MB/s ± 4%<td class='nodelta'>~<td class='note'>(p=0.579 n=10&#43;10)
<tr class='worse'><td>CRC32/poly=IEEE/size=40/align=0-8<td>975MB/s ± 1%<td>942MB/s ± 5%<td class='delta'>−3.37%<td class='note'>(p=0.001 n=8&#43;10)
Expand Down

0 comments on commit c133759

Please sign in to comment.