Repository navigation
Commit 9a2a5fb
committed
CSV reporter: escape counter names and keep skipped rows full width
Two ways the CSV output could stop being well-formed:
The header wrote each user counter name as "\"" << name << "\"", so a
counter whose name contains a double quote produced a broken header
field. Write it with CsvEscape, like every other string field. Names
without quotes come out exactly as before.
A skipped benchmark's row stopped after error_message, without the
empty fields for the user counters that every other row and the header
have. Readers then see a row with fewer columns than the header (the
test helper's own ResultsChecker asserts that the widths match). Append
one empty field per user counter.
user_counters_test gains a skipped benchmark; its CSV row now ends with
the two empty "bar" and "foo" fields, and the test fails with "End of
output reached before match" without this change.1 parent 82a8950 commit 9a2a5fb
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 81 | + | |
| 82 | + | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
590 | 604 | | |
591 | 605 | | |
592 | 606 | | |
| |||
0 commit comments