summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-16 13:07:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-16 13:07:44 +0000
commit64b1751194754a20173bbf48cff2035078bc225f (patch)
treea0715b68e0aff7131f01c822d6d067a31f1fb570
parent9af8102225d13f3f5fd49e6e12f4819e5e1a437d (diff)
* benchmark/driver.rb: some refactoring.
(1) Remove `average differential'. In this benchmark driver, We should not care about `average'. We use fastest score because this score should not include any disturbances (affections of background process, etc). If you care about timing affect, I recommend `median' score with more than 5 examinations rather than simple `average' score (`average' score was affected by error scores). (2) Show log file name. (3) Change default directory from './' to driver's directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog13
-rw-r--r--benchmark/driver.rb19
2 files changed, 18 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a4d60f..2346e6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Oct 16 21:59:01 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: some refactoring.
+ (1) Remove `average differential'.
+ In this benchmark driver, We should not care about `average'.
+ We use fastest score because this score should not include
+ any disturbances (affections of background process, etc).
+ If you care about timing affect, I recommend `median'
+ score with more than 5 examinations rather than simple
+ `average' score (`average' score was affected by error scores).
+ (2) Show log file name.
+ (3) Change default directory from './' to driver's directory.
+
Tue Oct 16 14:56:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_join): need to check again after any conversion run.
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 2b7c769..7cd2714 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -113,10 +113,7 @@ class BenchmarkDriver
output "minimum results in each #{@repeat} measurements."
end
- difference = "\taverage difference" if @execs.length == 2
- total_difference = 0
-
- output "name\t#{@execs.map{|(_, v)| v}.join("\t")}#{difference}"
+ output "name\t#{@execs.map{|(_, v)| v}.join("\t")}"
@results.each{|v, result|
rets = []
s = nil
@@ -137,18 +134,12 @@ class BenchmarkDriver
rets << sprintf("%.3f", r)
}
- if difference
- diff = average(result.last) - average(result.first)
- total_difference += diff
- rets << sprintf("%.3f", diff)
- end
-
output "#{v}#{s}\t#{rets.join("\t")}"
}
- if difference and @verbose
- output '-----------------------------------------------------------'
- output "average total difference is #{total_difference}"
+ if @opt[:output]
+ output
+ output "Log file: #{@opt[:output]}"
end
end
@@ -234,7 +225,7 @@ end
if __FILE__ == $0
opt = {
:execs => ['ruby'],
- :dir => './',
+ :dir => File.dirname(__FILE__),
:repeat => 1,
:output => "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}",
}