12 lines
254 B
Ruby
12 lines
254 B
Ruby
|
require_relative '../../lib/oga'
|
||
|
require 'benchmark/ips'
|
||
|
|
||
|
html = File.read(File.expand_path('../../fixtures/hrs.html', __FILE__))
|
||
|
lexer = Oga::Lexer.new(:html => true)
|
||
|
|
||
|
Benchmark.ips do |bench|
|
||
|
bench.report 'lex HTML' do
|
||
|
lexer.lex(html)
|
||
|
end
|
||
|
end
|