diff --git a/benchmark/pull_parser/bench_big_xml_time.rb b/benchmark/pull_parser/bench_big_xml_time.rb new file mode 100644 index 0000000..7d79424 --- /dev/null +++ b/benchmark/pull_parser/bench_big_xml_time.rb @@ -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