Benchmark for the pull parser.
This commit is contained in:
parent
5ed09236f9
commit
579c0499ed
|
@ -0,0 +1,11 @@
|
|||
require_relative '../../lib/oga'
|
||||
require 'benchmark'
|
||||
|
||||
xml = File.read(File.expand_path('../../fixtures/big.xml', __FILE__))
|
||||
parser = Oga::XML::PullParser.new(xml)
|
||||
|
||||
Benchmark.bmbm(10) do |bench|
|
||||
bench.report '10MB of XML' do
|
||||
parser.parse { |node| }
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue