aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--benchmark/driver.rb6
-rw-r--r--benchmark/memory_wrapper.rb4
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 75592a2746..8a07f6562a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 9 16:41:44 2016 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: fix output messages.
+
+ * benchmark/memory_wrapper.rb: use respond_to? because
+ member? does not work well.
+
Wed Mar 9 16:20:25 2016 Koichi Sasada <ko1@atdot.net>
* benchmark/driver.rb: support memory usage benchmark.
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 52d45e17fa..38c6e045f1 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -219,9 +219,9 @@ class BenchmarkDriver
if @execs.size > 1
output
output({
- rss: "Memory consuming ratio (RSS) with the result of `#{@execs[0][1]}' (greater is worse)",
- peak: "Memory consuming ratio (peak) with the result of `#{@execs[0][1]}' (greater is worse)",
- size: "Memory consuming ratio (size) with the result of `#{@execs[0][1]}' (greater is worse)",
+ real: "Speedup ratio: compare with the result of `#{@execs[0][1]}' (greater is better)"
+ peak: "Memory consuming ratio (peak) with the result of `#{@execs[0][1]}' (greater is better)",
+ size: "Memory consuming ratio (size) with the result of `#{@execs[0][1]}' (greater is better)",
}[@measure_target])
output if markdown
output ["name".ljust(name_width), @execs[1..-1].map.with_index{|(_, v), i| sprintf(strformat, v, width[i])}].join("").rstrip
diff --git a/benchmark/memory_wrapper.rb b/benchmark/memory_wrapper.rb
index f96b6f2341..3f4451a037 100644
--- a/benchmark/memory_wrapper.rb
+++ b/benchmark/memory_wrapper.rb
@@ -7,9 +7,9 @@ open(write_file, 'wb'){|f|
ms = Memory::Status.new
case target.to_sym
when :peak
- key = ms.member?(:hwm) ? :hwm : :peak
+ key = ms.respond_to?(:hwm) ? :hwm : :peak
when :size
- key = ms.member?(:rss) ? :rss : :size
+ key = ms.respond_to?(:rss) ? :rss : :size
end
f.puts ms[key]