Added benchmarks for Traversal#each_node

This commit is contained in:
Yorick Peterse 2015-04-12 22:34:53 +02:00
parent e6d2ba4e0e
commit 235180e821
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,9 @@
require_relative '../../benchmark_helper'
doc = Oga.parse_xml(big_xml_file)
doc.each_node { }
measure_average do
doc.each_node { }
end

View File

@ -0,0 +1,9 @@
require_relative '../../benchmark_helper'
doc = Oga.parse_xml(big_xml_file)
Benchmark.ips do |bench|
bench.report 'each_node' do
doc.each_node { }
end
end