Benchmark for parsing big XML documents.
This commit is contained in:
parent
45b0cdf811
commit
70fcc8534c
|
@ -0,0 +1,11 @@
|
|||
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
|
Loading…
Reference in New Issue