summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-05 02:38:54 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-05 02:38:54 (GMT)
commitd816b8e4e67a65125172c0d1d351156b2910cf13 (patch)
tree76cfc6e013820ab29407da064c3e09e4c3038b16 /benchmark
parent36a18bb54a3f57aed98971b41b767e6a4f200848 (diff)
driver.rb: suffix
* benchmark/driver.rb: add suffix to default output file name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/driver.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 39f6761..3350f65 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -290,10 +290,14 @@ if __FILE__ == $0
:execs => [],
:dir => File.dirname(__FILE__),
:repeat => 1,
- :output => "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}",
+ :output => nil,
:raw_output => nil,
:format => :tsv,
}
+ formats = {
+ :tsv => ".tsv",
+ :markdown => ".md",
+ }
parser = OptionParser.new{|o|
o.on('-e', '--executables [EXECS]',
@@ -323,7 +327,7 @@ if __FILE__ == $0
o.on('--rawdata-output [FILE]', 'output rawdata'){|r|
opt[:rawdata_output] = r
}
- o.on('-f', '--format={tsv,markdown}', 'output format', [:tsv, :markdown]){|r|
+ o.on('-f', "--format=FORMAT", "output format (#{formats.keys.join(",")})", formats.keys){|r|
opt[:format] = r
}
o.on('-v', '--verbose'){|v|
@@ -336,6 +340,7 @@ if __FILE__ == $0
}
parser.parse!(ARGV)
+ opt[:output] ||= "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}#{formats[opt[:format]]}"
BenchmarkDriver.benchmark(opt)
end