oga/benchmark/xpath/lexer/simple.rb

10 lines
230 B
Ruby

require_relative '../../benchmark_helper'
xpath = '/wikimedia/projects/project[@name="Wikipedia"]/editions/edition/text()'
Benchmark.ips do |bench|
bench.report 'simple XPath' do
Oga::XPath::Lexer.new(xpath).lex
end
end