From 9bda9dac196151874fa8c602d7029731b61ee19d Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 23 Jun 2014 20:50:07 +0200 Subject: [PATCH] Basic benchmark for the XPath parser. --- benchmark/xpath/parser/parser_bench.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 benchmark/xpath/parser/parser_bench.rb diff --git a/benchmark/xpath/parser/parser_bench.rb b/benchmark/xpath/parser/parser_bench.rb new file mode 100644 index 0000000..8fa3090 --- /dev/null +++ b/benchmark/xpath/parser/parser_bench.rb @@ -0,0 +1,9 @@ +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