2014-04-29 12:48:36 +00:00
|
|
|
require_relative '../../lib/oga'
|
|
|
|
require 'benchmark'
|
|
|
|
|
2014-05-01 10:25:49 +00:00
|
|
|
xml = File.read(File.expand_path('../../fixtures/big.xml', __FILE__))
|
2014-04-29 12:48:36 +00:00
|
|
|
|
|
|
|
Benchmark.bmbm(10) do |bench|
|
|
|
|
bench.report '10MB of XML' do
|
2014-04-30 07:28:28 +00:00
|
|
|
Oga::XML::Lexer.new(xml).advance { |tok| }
|
2014-04-29 12:48:36 +00:00
|
|
|
end
|
|
|
|
end
|