Simple benchmarks for the XPath lexer.
This commit is contained in:
parent
e75cd0ede8
commit
99615d72f9
|
@ -0,0 +1,9 @@
|
|||
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
|
|
@ -0,0 +1,9 @@
|
|||
require_relative '../../benchmark_helper'
|
||||
|
||||
xpath = '/wikimedia/projects/project[@name="Wikipedia"]/editions/edition/text()'
|
||||
|
||||
Benchmark.bmbm(10) do |bench|
|
||||
bench.report 'simple XPath' do
|
||||
Oga::XPath::Lexer.new(xpath).lex
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue