2014-03-23 11:46:04 +00:00
|
|
|
require_relative '../../lib/oga'
|
|
|
|
require 'benchmark'
|
|
|
|
|
|
|
|
html = File.read(File.expand_path('../../fixtures/hrs.html', __FILE__))
|
2014-03-25 08:34:38 +00:00
|
|
|
lexer = Oga::XML::Lexer.new(:html => true)
|
2014-03-23 11:46:04 +00:00
|
|
|
|
|
|
|
Benchmark.bmbm(20) do |bench|
|
|
|
|
bench.report 'lex HTML' do
|
|
|
|
lexer.lex(html)
|
|
|
|
end
|
|
|
|
end
|