summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-12 06:17:25 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-12 06:17:25 +0000
commit0d0344c1f0f912ad048406762c6518cf997237b3 (patch)
tree9542c2115795ea4c0f3604930454b62b54ad7f5e /benchmark
parent691a3a2bdc3495860405b1173d9081804a55c350 (diff)
* benchmark/driver.rb: suppress unused/shadowing variable warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/driver.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 7dab292..f689ebf 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -84,7 +84,7 @@ class BenchmarkDriver
if @verbose
@start_time = Time.now
message @start_time
- @execs.each_with_index{|(e, v), i|
+ @execs.each_with_index{|(_, v), i|
message "target #{i}: #{v}"
}
end
@@ -116,7 +116,7 @@ class BenchmarkDriver
difference = "\taverage difference" if @execs.length == 2
total_difference = 0
- output "name\t#{@execs.map{|(e, v)| v}.join("\t")}#{difference}"
+ output "name\t#{@execs.map{|(_, v)| v}.join("\t")}#{difference}"
@results.each{|v, result|
rets = []
s = nil
@@ -154,7 +154,6 @@ class BenchmarkDriver
def files
flag = {}
- vm1 = vm2 = wl1 = wl2 = false
@files = Dir.glob(File.join(@dir, 'bm*.rb')).map{|file|
next if @pattern && /#{@pattern}/ !~ File.basename(file)
case file
@@ -253,8 +252,8 @@ if __FILE__ == $0
o.on('-r', '--repeat-count [NUM]', "Repeat count"){|n|
opt[:repeat] = n.to_i
}
- o.on('-o', '--output-file [FILE]', "Output file"){|o|
- opt[:output] = o
+ o.on('-o', '--output-file [FILE]', "Output file"){|f|
+ opt[:output] = f
}
o.on('-q', '--quiet', "Run without notify information except result table."){|q|
opt[:quiet] = q