Removed two useless XML lexer benchmarks.

This commit is contained in:
Yorick Peterse 2014-09-02 10:03:30 +02:00
parent c69d77109b
commit 8bab5c70d8
2 changed files with 0 additions and 39 deletions

View File

@ -1,20 +0,0 @@
require_relative '../../benchmark_helper'
string = 'Hello, how are you doing today?'
small = "<![CDATA[#{string}]]>"
medium = "<![CDATA[#{string * 1_000}]]>"
large = "<![CDATA[#{string * 10_000}]]>"
Benchmark.ips do |bench|
bench.report 'CDATA with a small body' do
Oga::XML::Lexer.new(small).lex
end
bench.report 'CDATA with a medium body' do
Oga::XML::Lexer.new(medium).lex
end
bench.report 'CDATA with a large body' do
Oga::XML::Lexer.new(large).lex
end
end

View File

@ -1,19 +0,0 @@
require_relative '../../benchmark_helper'
simple = '<p>Hello world</p>'
attributes = '<p class="foo">Hello world</p>'
nested = '<p>Hello<strong>world</strong></p>'
Benchmark.ips do |bench|
bench.report 'text only' do
Oga::XML::Lexer.new(simple).lex
end
bench.report 'text + attributes' do
Oga::XML::Lexer.new(attributes).lex
end
bench.report 'text + children' do
Oga::XML::Lexer.new(nested).lex
end
end