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::PullParser.new(xml)
|
||||
|
||||
Benchmark.bmbm(10) do |bench|
|
||||
bench.report '10MB of XML' do
|
||||
parser.parse { |node| }
|
||||
end
|
||||
end
|
||||
@@ -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::PullParser.new(xml).parse { }
|
||||
end
|
||||
|
||||
bench.report '10MB as an IO' do
|
||||
Oga::XML::PullParser.new(big_xml_file).parse { }
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user