Skip to content

Commit c7c2e6e

Browse files
committed
[benchmark-dtrace] Fix the amount of samples taken along side the number of iters.
Otherwise, the output is not stable.
1 parent d48cdd9 commit c7c2e6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/scripts/Benchmark_DTrace.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ class DTraceBenchmarkDriver(perf_test_driver.BenchmarkDriver):
9090
e['SWIFT_DETERMINISTIC_HASHING'] = '1'
9191
p = subprocess.Popen([
9292
'sudo', 'dtrace', '-s', DTRACE_PATH,
93-
'-c', '%s %s %s' % (data['path'], data['test_name'],
94-
'--num-iters=%d' % iters)
93+
'-c', '%s %s %s %s' % (data['path'], data['test_name'],
94+
'--num-iters=%d' % iters,
95+
'--num-samples=2')
9596
], stdout=subprocess.PIPE, stderr=open('/dev/null', 'w'), env=e)
9697
results = [x for x in p.communicate()[0].split("\n") if len(x) > 0]
9798
return [

0 commit comments

Comments
 (0)