[benchmark] Use header in CSV log

Since the meaning of some columns was changed, but their overall number remained, let’s include the header in the CSV log to make it clear that we are now reporting MIN, Q1, MEDIAN, Q3, MAX, MAX_RSS, instead of the old MIN, MAX, MEAN, SD, MEDIAN, MAX_RSS format.
This commit is contained in:
Pavol Vaskovic
2018-10-12 10:03:33 +02:00
parent 397c44747b
commit d9a89ffea2
2 changed files with 8 additions and 7 deletions

View File

@@ -306,12 +306,13 @@ class TestBenchmarkDriverRunningTests(unittest.TestCase):
with captured_output() as (out, _):
log = driver.run_and_log()
header = '#,TEST,SAMPLES,MIN(μs),Q1(μs),MEDIAN(μs),Q3(μs),MAX(μs),' +\
'MAX_RSS(B)\n'
csv_log = '3,b1,5,101,102,103,104,105,888\n'
self.assertEquals(log, None)
self.assertEquals(
out.getvalue(),
'#,TEST,SAMPLES,MIN(μs),Q1(μs),MEDIAN(μs),Q3(μs),MAX(μs),' +
'MAX_RSS(B)\n' +
header +
csv_log +
'\n' +
'Total performance tests executed: 1\n')
@@ -319,7 +320,7 @@ class TestBenchmarkDriverRunningTests(unittest.TestCase):
with captured_output() as (out, _):
log = driver.run_and_log(csv_console=False)
self.assertEquals(log, csv_log)
self.assertEquals(log, header + csv_log)
self.assertEquals(
out.getvalue(),
' # TEST SAMPLES MIN(μs) Q1(μs)' +