Re-organized/cleaned up the benchmarks directory.
This commit is contained in:
1 parent
b8cc6b5031
commit
5259c31b36
20 files changed
+41
-73
No files matched your search
File renamed without changes.
@@ -1,10 +0,0 @@
|
||||
require_relative '../../benchmark_helper'
|
||||
|
||||
xml = read_big_xml
|
||||
parser = Oga::XML::Parser.new(xml)
|
||||
|
||||
Benchmark.bmbm(10) do |bench|
|
||||
bench.report '10MB of XML' do
|
||||
parser.parse
|
||||
end
|
||||
end
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,13 @@
|
||||
require_relative '../../benchmark_helper'
|
||||
|
||||
xml = read_big_xml
|
||||
|
||||
Benchmark.ips do |bench|
|
||||
bench.report '10MB as a String' do
|
||||
Oga::XML::Parser.new(xml).parse
|
||||
end
|
||||
|
||||
bench.report '10MB as an IO' do
|
||||
Oga::XML::Parser.new(big_xml_file).parse
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user