Namespaced benchmarks per parser category.
This commit is contained in:
parent
f557aaef76
commit
61d553be34
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
measure_average do
|
measure_average do
|
||||||
Oga::XML::Lexer.new(big_xml_file).advance { }
|
Oga::XML::Lexer.new(big_xml_file).advance { }
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
Benchmark.bmbm(10) do |bench|
|
Benchmark.bmbm(10) do |bench|
|
||||||
bench.report '10MB of XML using IO' do
|
bench.report '10MB of XML using IO' do
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
string = 'Hello, how are you doing today?'
|
string = 'Hello, how are you doing today?'
|
||||||
small = "<![CDATA[#{string}]]>"
|
small = "<![CDATA[#{string}]]>"
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
simple = '<p>Hello world</p>'
|
simple = '<p>Hello world</p>'
|
||||||
attributes = '<p class="foo">Hello world</p>'
|
attributes = '<p class="foo">Hello world</p>'
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
html = read_html
|
html = read_html
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
html = read_html
|
html = read_html
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
lines = xml.lines.count
|
lines = xml.lines.count
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
parser = Oga::XML::Parser.new(xml)
|
parser = Oga::XML::Parser.new(xml)
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
simple = '<p>Hello world</p>'
|
simple = '<p>Hello world</p>'
|
||||||
attributes = '<p class="foo">Hello world</p>'
|
attributes = '<p class="foo">Hello world</p>'
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
html = read_html
|
html = read_html
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative '../benchmark_helper'
|
require_relative '../../benchmark_helper'
|
||||||
|
|
||||||
xml = read_big_xml
|
xml = read_big_xml
|
||||||
parser = Oga::XML::PullParser.new(xml)
|
parser = Oga::XML::PullParser.new(xml)
|
Loading…
Reference in New Issue