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