2014-04-10 08:05:04 +00:00
|
|
|
require_relative '../../lib/oga'
|
|
|
|
require 'benchmark/ips'
|
|
|
|
|
2014-04-10 19:31:01 +00:00
|
|
|
html = File.read(File.expand_path('../../fixtures/gist.html', __FILE__))
|
2014-04-10 08:05:04 +00:00
|
|
|
|
|
|
|
Benchmark.ips do |bench|
|
|
|
|
bench.report 'parse HTML' do
|
|
|
|
Oga::HTML::Parser.new(html).parse
|
|
|
|
end
|
|
|
|
end
|