oga/benchmark/xpath/parser/parser_bench.rb

10 lines
238 B
Ruby
Raw Normal View History

2014-06-23 18:50:07 +00:00
require_relative '../../benchmark_helper'
xpath = '/wikimedia/projects/project[@name="Wikipedia"]/editions/edition/text()'
Benchmark.ips do |bench|
bench.report 'Wikipedia example' do
Oga::XPath::Parser.new(xpath).parse
end
end