зеркало из https://github.com/github/ruby.git
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:
Родитель
36a18bb54a
Коммит
d816b8e4e6
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче