Added benchmarks for Traversal#each_node
This commit is contained in:
parent
e6d2ba4e0e
commit
235180e821
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue