mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Drop -w option in bin/bench
This commit is contained in:
parent
a5dddba928
commit
6a69515606
2 changed files with 10 additions and 11 deletions
|
@ -8,7 +8,6 @@ require 'benchmark/ips'
|
|||
require 'hamlit1' if File.exist?('hamlit1')
|
||||
|
||||
class Bench < Thor
|
||||
class_option :with_hamlit1, type: :boolean, aliases: ['-w']
|
||||
class_option :show_template, type: :boolean, aliases: ['-t']
|
||||
|
||||
desc 'bench HAML', 'Benchmark haml template'
|
||||
|
@ -28,8 +27,8 @@ class Bench < Thor
|
|||
Benchmark.ips do |x|
|
||||
x.report("haml v#{Haml::VERSION}") { Haml::Engine.new(haml, escape_html: true, escape_attrs: true, ugly: true).precompiled }
|
||||
x.report("faml v#{Faml::VERSION}") { Faml::Engine.new.call(haml) }
|
||||
x.report("hamlit#{options[:with_hamlit1] ? '2' : ''} v#{Hamlit::VERSION}") { Hamlit::Engine.new.call(haml) }
|
||||
x.report("hamlit1 v#{Hamlit1::VERSION}") { Hamlit1::Engine.new.call(haml) } if File.exist?('hamlit1') && options[:with_hamlit1]
|
||||
x.report("hamlit#{File.exist?('hamlit1') ? '2' : ''} v#{Hamlit::VERSION}") { Hamlit::Engine.new.call(haml) }
|
||||
x.report("hamlit1 v#{Hamlit1::VERSION}") { Hamlit1::Engine.new.call(haml) } if File.exist?('hamlit1')
|
||||
x.compare!
|
||||
end
|
||||
end
|
||||
|
@ -53,8 +52,8 @@ class Bench < Thor
|
|||
Benchmark.ips do |x|
|
||||
x.report("haml v#{Haml::VERSION}") { object.haml }
|
||||
x.report("faml v#{Faml::VERSION}") { object.faml }
|
||||
x.report("hamlit#{options[:with_hamlit1] ? '2' : ''} v#{Hamlit::VERSION}") { object.hamlit }
|
||||
x.report("hamlit1 v#{Hamlit1::VERSION}") { object.hamlit1 } if File.exist?('hamlit1') && options[:with_hamlit1]
|
||||
x.report("hamlit#{File.exist?('hamlit1') ? '2' : ''} v#{Hamlit::VERSION}") { object.hamlit }
|
||||
x.report("hamlit1 v#{Hamlit1::VERSION}") { object.hamlit1 } if File.exist?('hamlit1')
|
||||
x.compare!
|
||||
end
|
||||
end
|
||||
|
|
12
wercker.yml
12
wercker.yml
|
@ -14,22 +14,22 @@ build:
|
|||
code: bin/clone
|
||||
- script:
|
||||
name: "[benchmark] static attributes"
|
||||
code: bin/bench bench -w -t benchmark/boolean_attribute.haml benchmark/class_attribute.haml benchmark/id_attribute.haml benchmark/data_attribute.haml benchmark/common_attribute.haml
|
||||
code: bin/bench bench -t benchmark/boolean_attribute.haml benchmark/class_attribute.haml benchmark/id_attribute.haml benchmark/data_attribute.haml benchmark/common_attribute.haml
|
||||
- script:
|
||||
name: "[benchmark] dynamic attributes"
|
||||
code: bin/bench bench -w -t benchmark/dynamic_attributes/boolean_attribute.haml benchmark/dynamic_attributes/class_attribute.haml benchmark/dynamic_attributes/id_attribute.haml benchmark/dynamic_attributes/data_attribute.haml benchmark/dynamic_attributes/common_attribute.haml
|
||||
code: bin/bench bench -t benchmark/dynamic_attributes/boolean_attribute.haml benchmark/dynamic_attributes/class_attribute.haml benchmark/dynamic_attributes/id_attribute.haml benchmark/dynamic_attributes/data_attribute.haml benchmark/dynamic_attributes/common_attribute.haml
|
||||
- script:
|
||||
name: "[benchmark] plain text"
|
||||
code: bin/bench bench -w -t benchmark/plain.haml
|
||||
code: bin/bench bench -t benchmark/plain.haml
|
||||
- script:
|
||||
name: "[benchmark] script"
|
||||
code: bin/bench bench -w -t benchmark/script.haml
|
||||
code: bin/bench bench -t benchmark/script.haml
|
||||
- script:
|
||||
name: "[benchmark] attribute_builder bench by faml"
|
||||
code: bin/bench bench -w -t benchmark/etc/attribute_builder.haml
|
||||
code: bin/bench bench -t benchmark/etc/attribute_builder.haml
|
||||
- script:
|
||||
name: "[benchmark] slim-template/slim/benchmarks"
|
||||
code: bundle exec ruby benchmark/slim/run-benchmarks.rb
|
||||
- script:
|
||||
name: "[benchmark] static analyzer"
|
||||
code: bin/bench bench -w -t benchmark/etc/static_analyzer.haml
|
||||
code: bin/bench bench -t benchmark/etc/static_analyzer.haml
|
||||
|
|
Loading…
Reference in a new issue