Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ set(SWIFT_BENCH_MODULES
single-source/Exclusivity
single-source/ExistentialPerformance
single-source/Fibonacci
single-source/FlattenList
single-source/Flatten
single-source/FloatingPointPrinting
single-source/Hanoi
single-source/Hash
single-source/HashQuadratic
single-source/Histogram
single-source/InsertCharacter
single-source/InsertCharacter
single-source/Integrate
single-source/IterateData
single-source/Join
Expand Down
2 changes: 1 addition & 1 deletion benchmark/scripts/Benchmark_Driver
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class BenchmarkDriver(object):
with open(log_file, 'w') as f:
f.write(output)

RESULT = '{:>3} {:<25} {:>7} {:>7} {:>6} {:>10} {:>6} {:>7} {:>10}'
RESULT = '{:>3} {:<40} {:>7} {:>7} {:>6} {:>10} {:>6} {:>7} {:>10}'

def run_and_log(self, csv_console=True):
"""Run benchmarks and continuously log results to the console.
Expand Down
6 changes: 3 additions & 3 deletions benchmark/scripts/compare_perf_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ def _reset(self):
# Parse lines like this
# #,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
results_re = re.compile(
r'( *\d+[, \t]+[\w.]+[, \t]+' + # #,TEST
r'[, \t]+'.join([r'\d+'] * 2) + # at least 2...
r'(?:[, \t]+\d*)*)') # ...or more numeric columns
r'( *\d+[, \t]+[\w.\-]+[, \t]+' + # #,TEST
r'[, \t]+'.join([r'\d+'] * 2) + # at least 2...
r'(?:[, \t]+\d*)*)') # ...or more numeric columns

def _append_result(self, result):
columns = result.split(',') if ',' in result else result.split()
Expand Down
8 changes: 4 additions & 4 deletions benchmark/scripts/test_Benchmark_Driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ def mock_run(test):
self.assertEquals(log, header + csv_log)
self.assertEquals(
out.getvalue(),
' # TEST SAMPLES MIN(μs) Q1(μs)' +
' MEDIAN(μs) Q3(μs) MAX(μs) MAX_RSS(B)\n' +
' 3 b1 5 101 102' +
' 103 104 105 888\n' +
' # TEST SAMPLES MIN(μs)' +
' Q1(μs) MEDIAN(μs) Q3(μs) MAX(μs) MAX_RSS(B)\n' +
' 3 b1 5 101' +
' 102 103 104 105 888\n' +
'\n' +
'Total performance tests executed: 1\n')

Expand Down
5 changes: 3 additions & 2 deletions benchmark/scripts/test_compare_perf_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,15 @@ class TestLogParser(unittest.TestCase):
def test_parse_results_csv(self):
"""Ignores uknown lines, extracts data from supported formats."""
log = """#,TEST,SAMPLES,MIN(us),MAX(us),MEAN(us),SD(us),MEDIAN(us)
34,BitCount,20,3,4,4,0,4
34,Flatten.Array.Tuple4.lazy.for-in.Reserve,20,3,4,4,0,4

Total performance tests executed: 1
"""
parser = LogParser()
results = parser.parse_results(log.splitlines())
self.assertTrue(isinstance(results[0], PerformanceTestResult))
self.assertEquals(results[0].name, 'BitCount')
self.assertEquals(results[0].name,
'Flatten.Array.Tuple4.lazy.for-in.Reserve')

def test_parse_results_tab_delimited(self):
log = '34\tBitCount\t20\t3\t4\t4\t0\t4'
Expand Down
Loading