oga/benchmark/parser/bench_big_xml_time.rb

12 lines
252 B
Ruby
Raw Normal View History

require_relative '../../lib/oga'
require 'benchmark'
xml = File.read(File.expand_path('../../fixtures/big.xml', __FILE__))
parser = Oga::XML::Parser.new(xml)
Benchmark.bmbm(10) do |bench|
bench.report '11MB of XML' do
parser.parse
end
end