From c68b038e536c433ef3550deba9d71b988b2dd98f Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 13 Feb 2015 09:36:24 +0100 Subject: [PATCH] Added benchmark for the CSS parser. --- benchmark/css/parser/parser_bench.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 benchmark/css/parser/parser_bench.rb diff --git a/benchmark/css/parser/parser_bench.rb b/benchmark/css/parser/parser_bench.rb new file mode 100644 index 0000000..a3e167f --- /dev/null +++ b/benchmark/css/parser/parser_bench.rb @@ -0,0 +1,9 @@ +require_relative '../../benchmark_helper' + +css = 'foo bar bar.some_class element#with_id[title="Foo"]' + +Benchmark.ips do |bench| + bench.report 'CSS' do + Oga::CSS::Parser.new(css).parse + end +end