From c4ac0560c88e45e026fdfaa313b6417458da53ce Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Jan 2014 10:27:36 +0000 Subject: [PATCH] benchmark/driver: avoid large alloc in driver process Using backtick to capture output on bm_so_reverse_complement leads to unpredictable results because the Ruby process capturing needs to slurp the 25M output of that benchmark, meaning the GC run of the driver process ends up bottlenecking the processes being benchmarked. Instead, just redirect to File::NULL which is /dev/null on Unix-like systems. --- benchmark/driver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/driver.rb b/benchmark/driver.rb index 695dc41..cbc72cf 100644 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -242,7 +242,7 @@ class BenchmarkDriver cmd = "#{executable} #{@ruby_arg} #{file}" m = Benchmark.measure{ - `#{cmd}` + system(cmd, out: File::NULL) } if $? != 0 -- 1.8.5.2.193.g2394e94