Sha256: ad7a98e5bfe8dbb3eceb158d15b28652e8f508ace7957647e7fb0a886017c626

Contents?: true

Size: 657 Bytes

Versions: 126

Compression:

Stored size: 657 Bytes

Contents

require "benchmark"
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
obj = YARD::Registry.at("YARD::CodeObjects::Base")

TIMES = 3
Benchmark.bm do |x|
  x.report("trim-line") { TIMES.times { obj.format(:format => :html) } }
  module YARD
    module Templates
      module Template
        def erb(section, &block)
          erb = ERB.new(cache(section), nil)
          erb.filename = cache_filename(section).to_s
          erb.result(binding, &block)
        end
      end
    end
  end
  x.report("no-trim  ") { TIMES.times { obj.format(:format => :html) } }
end

Version data entries

126 entries across 106 versions & 10 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/benchmarks/template_erb.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/benchmarks/template_erb.rb
yard-0.9.5 benchmarks/template_erb.rb
yard-0.9.4 benchmarks/template_erb.rb
yard-0.9.3 benchmarks/template_erb.rb
yard-0.9.2 benchmarks/template_erb.rb
yard-0.9.1 benchmarks/template_erb.rb
yard-0.9.0 benchmarks/template_erb.rb
yard-0.8.7.6 benchmarks/template_erb.rb
yard-0.8.7.5 benchmarks/template_erb.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
yard-0.8.7.4 benchmarks/template_erb.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/benchmarks/template_erb.rb