lib/mp_perf.rb in stresser-0.4.0 vs lib/mp_perf.rb in stresser-0.5.0
- old
+ new
@@ -68,12 +68,20 @@
#
# Runs a single benchmark (this method will be called many times
# with different concurrency levels)
#
def single_benchmark(conf)
-
+ cloned_conf = conf.clone
+
+ # Shuffle the logfile around?
+ if conf['httperf_wlog'] and conf['shuffle']=='true'
+ file = conf['httperf_wlog'].split(',').last
+ `cat #{file} | tr "\\0" "\\n" | sort --random-sort | tr "\\n" "\\0" > #{file}.shuffled`
+ cloned_conf['httperf_wlog'] = conf['httperf_wlog']+'.shuffled'
+ end
+
# Run httperf
- res = Httperf.run(conf)
+ res = Httperf.run(cloned_conf)
return res
end
def run_suite