mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Fix benchmark
This commit is contained in:
parent
2ff1a8bc3b
commit
6d7d5ca760
1 changed files with 0 additions and 15 deletions
|
@ -73,7 +73,6 @@ class Benchmarks
|
|||
end
|
||||
x.compare!
|
||||
end
|
||||
assert_fastest(result)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -89,20 +88,6 @@ class Benchmarks
|
|||
printf "%20s %10s\n", name, "v#{version}"
|
||||
end
|
||||
end
|
||||
|
||||
def assert_fastest(result)
|
||||
hamlit = result.entries.first
|
||||
rival = result.entries[1..-1].max_by(&:ips)
|
||||
|
||||
if hamlit.ips < rival.ips
|
||||
fatal "Hamlit is slower than #{rival.label}"
|
||||
end
|
||||
end
|
||||
|
||||
def fatal(message)
|
||||
puts "\e[31m#{message}\e[0m"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
||||
time = (ENV['TIME'] || 5).to_i
|
||||
|
|
Loading…
Reference in a new issue