mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
36a18bb54a
commit
d816b8e4e6
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue