From 61d553be3408aa825fd664c8060e119bd575db9e Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 13 Jun 2014 00:25:39 +0200 Subject: [PATCH] Namespaced benchmarks per parser category. --- benchmark/{ => xml}/lexer/big_xml_average.rb | 2 +- benchmark/{ => xml}/lexer/big_xml_io_average.rb | 2 +- benchmark/{ => xml}/lexer/big_xml_io_time.rb | 2 +- benchmark/{ => xml}/lexer/big_xml_time.rb | 2 +- benchmark/{ => xml}/lexer/cdata.rb | 2 +- benchmark/{ => xml}/lexer/element.rb | 2 +- benchmark/{ => xml}/lexer/html.rb | 2 +- benchmark/{ => xml}/lexer/html_time.rb | 2 +- benchmark/{ => xml}/lexer/line_rate.rb | 2 +- benchmark/{ => xml}/parser/big_xml_average.rb | 2 +- benchmark/{ => xml}/parser/big_xml_time.rb | 2 +- benchmark/{ => xml}/parser/element.rb | 2 +- benchmark/{ => xml}/parser/html.rb | 2 +- benchmark/{ => xml}/pull_parser/big_xml_average.rb | 2 +- benchmark/{ => xml}/pull_parser/big_xml_time.rb | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) rename benchmark/{ => xml}/lexer/big_xml_average.rb (66%) rename benchmark/{ => xml}/lexer/big_xml_io_average.rb (63%) rename benchmark/{ => xml}/lexer/big_xml_io_time.rb (76%) rename benchmark/{ => xml}/lexer/big_xml_time.rb (76%) rename benchmark/{ => xml}/lexer/cdata.rb (91%) rename benchmark/{ => xml}/lexer/element.rb (90%) rename benchmark/{ => xml}/lexer/html.rb (75%) rename benchmark/{ => xml}/lexer/html_time.rb (76%) rename benchmark/{ => xml}/lexer/line_rate.rb (87%) rename benchmark/{ => xml}/parser/big_xml_average.rb (65%) rename benchmark/{ => xml}/parser/big_xml_time.rb (77%) rename benchmark/{ => xml}/parser/element.rb (90%) rename benchmark/{ => xml}/parser/html.rb (74%) rename benchmark/{ => xml}/pull_parser/big_xml_average.rb (67%) rename benchmark/{ => xml}/pull_parser/big_xml_time.rb (79%) diff --git a/benchmark/lexer/big_xml_average.rb b/benchmark/xml/lexer/big_xml_average.rb similarity index 66% rename from benchmark/lexer/big_xml_average.rb rename to benchmark/xml/lexer/big_xml_average.rb index ccb3f2e..fb313f7 100644 --- a/benchmark/lexer/big_xml_average.rb +++ b/benchmark/xml/lexer/big_xml_average.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml diff --git a/benchmark/lexer/big_xml_io_average.rb b/benchmark/xml/lexer/big_xml_io_average.rb similarity index 63% rename from benchmark/lexer/big_xml_io_average.rb rename to benchmark/xml/lexer/big_xml_io_average.rb index 23757e3..ae4fc82 100644 --- a/benchmark/lexer/big_xml_io_average.rb +++ b/benchmark/xml/lexer/big_xml_io_average.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' measure_average do Oga::XML::Lexer.new(big_xml_file).advance { } diff --git a/benchmark/lexer/big_xml_io_time.rb b/benchmark/xml/lexer/big_xml_io_time.rb similarity index 76% rename from benchmark/lexer/big_xml_io_time.rb rename to benchmark/xml/lexer/big_xml_io_time.rb index ad5ed96..7c8490e 100644 --- a/benchmark/lexer/big_xml_io_time.rb +++ b/benchmark/xml/lexer/big_xml_io_time.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' Benchmark.bmbm(10) do |bench| bench.report '10MB of XML using IO' do diff --git a/benchmark/lexer/big_xml_time.rb b/benchmark/xml/lexer/big_xml_time.rb similarity index 76% rename from benchmark/lexer/big_xml_time.rb rename to benchmark/xml/lexer/big_xml_time.rb index 3a20745..73251f9 100644 --- a/benchmark/lexer/big_xml_time.rb +++ b/benchmark/xml/lexer/big_xml_time.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml diff --git a/benchmark/lexer/cdata.rb b/benchmark/xml/lexer/cdata.rb similarity index 91% rename from benchmark/lexer/cdata.rb rename to benchmark/xml/lexer/cdata.rb index e1bed6a..a35f84b 100644 --- a/benchmark/lexer/cdata.rb +++ b/benchmark/xml/lexer/cdata.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' string = 'Hello, how are you doing today?' small = "" diff --git a/benchmark/lexer/element.rb b/benchmark/xml/lexer/element.rb similarity index 90% rename from benchmark/lexer/element.rb rename to benchmark/xml/lexer/element.rb index 379544c..f8768cb 100644 --- a/benchmark/lexer/element.rb +++ b/benchmark/xml/lexer/element.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' simple = '

Hello world

' attributes = '

Hello world

' diff --git a/benchmark/lexer/html.rb b/benchmark/xml/lexer/html.rb similarity index 75% rename from benchmark/lexer/html.rb rename to benchmark/xml/lexer/html.rb index ba921f8..e90d19e 100644 --- a/benchmark/lexer/html.rb +++ b/benchmark/xml/lexer/html.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' html = read_html diff --git a/benchmark/lexer/html_time.rb b/benchmark/xml/lexer/html_time.rb similarity index 76% rename from benchmark/lexer/html_time.rb rename to benchmark/xml/lexer/html_time.rb index fed6df9..97fad67 100644 --- a/benchmark/lexer/html_time.rb +++ b/benchmark/xml/lexer/html_time.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' html = read_html diff --git a/benchmark/lexer/line_rate.rb b/benchmark/xml/lexer/line_rate.rb similarity index 87% rename from benchmark/lexer/line_rate.rb rename to benchmark/xml/lexer/line_rate.rb index fe35eeb..20f334f 100644 --- a/benchmark/lexer/line_rate.rb +++ b/benchmark/xml/lexer/line_rate.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml lines = xml.lines.count diff --git a/benchmark/parser/big_xml_average.rb b/benchmark/xml/parser/big_xml_average.rb similarity index 65% rename from benchmark/parser/big_xml_average.rb rename to benchmark/xml/parser/big_xml_average.rb index fc12964..22bf519 100644 --- a/benchmark/parser/big_xml_average.rb +++ b/benchmark/xml/parser/big_xml_average.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml diff --git a/benchmark/parser/big_xml_time.rb b/benchmark/xml/parser/big_xml_time.rb similarity index 77% rename from benchmark/parser/big_xml_time.rb rename to benchmark/xml/parser/big_xml_time.rb index 0a68008..da3d7ca 100644 --- a/benchmark/parser/big_xml_time.rb +++ b/benchmark/xml/parser/big_xml_time.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml parser = Oga::XML::Parser.new(xml) diff --git a/benchmark/parser/element.rb b/benchmark/xml/parser/element.rb similarity index 90% rename from benchmark/parser/element.rb rename to benchmark/xml/parser/element.rb index 9bb452e..7270b3d 100644 --- a/benchmark/parser/element.rb +++ b/benchmark/xml/parser/element.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' simple = '

Hello world

' attributes = '

Hello world

' diff --git a/benchmark/parser/html.rb b/benchmark/xml/parser/html.rb similarity index 74% rename from benchmark/parser/html.rb rename to benchmark/xml/parser/html.rb index e68a8de..5e28983 100644 --- a/benchmark/parser/html.rb +++ b/benchmark/xml/parser/html.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' html = read_html diff --git a/benchmark/pull_parser/big_xml_average.rb b/benchmark/xml/pull_parser/big_xml_average.rb similarity index 67% rename from benchmark/pull_parser/big_xml_average.rb rename to benchmark/xml/pull_parser/big_xml_average.rb index 5b50c82..529cc84 100644 --- a/benchmark/pull_parser/big_xml_average.rb +++ b/benchmark/xml/pull_parser/big_xml_average.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml diff --git a/benchmark/pull_parser/big_xml_time.rb b/benchmark/xml/pull_parser/big_xml_time.rb similarity index 79% rename from benchmark/pull_parser/big_xml_time.rb rename to benchmark/xml/pull_parser/big_xml_time.rb index bbbeff2..197df00 100644 --- a/benchmark/pull_parser/big_xml_time.rb +++ b/benchmark/xml/pull_parser/big_xml_time.rb @@ -1,4 +1,4 @@ -require_relative '../benchmark_helper' +require_relative '../../benchmark_helper' xml = read_big_xml parser = Oga::XML::PullParser.new(xml)