2014-03-23 11:46:04 +00:00
|
|
|
require_relative '../../lib/oga'
|
|
|
|
require 'benchmark'
|
|
|
|
|
2014-04-10 19:31:01 +00:00
|
|
|
html = File.read(File.expand_path('../../fixtures/gist.html', __FILE__))
|
2014-03-23 11:46:04 +00:00
|
|
|
|
|
|
|
Benchmark.bmbm(20) do |bench|
|
|
|
|
bench.report 'lex HTML' do
|
2014-04-10 07:55:33 +00:00
|
|
|
Oga::XML::Lexer.new(html, :html => true).lex
|
2014-03-23 11:46:04 +00:00
|
|
|
end
|
|
|
|
end
|