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