oga/benchmark/lexer/bench_html.rb

11 lines
245 B
Ruby
Raw Normal View History

require_relative '../../lib/oga'
require 'benchmark/ips'
html = File.read(File.expand_path('../../fixtures/gist.html', __FILE__))
Benchmark.ips do |bench|
bench.report 'lex HTML' do
Oga::XML::Lexer.new(html, :html => true).lex
end
end