WIP: Test new parser
What does this MR do?
Just a PoC trying to move away from Hash.from_xml
but this is not performing very well so far.
Benchmark.bmbm do |x|
x.report("old (99_999)") { Gitlab::Ci::Parsers::Test::JunitOld.new.parse!(xml_99_999, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
x.report("new (99_999)") { Gitlab::Ci::Parsers::Test::Junit.new.parse!(xml_99_999, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
x.report("old (499_995)") { Gitlab::Ci::Parsers::Test::JunitOld.new.parse!(xml_499_995, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
x.report("new (499_995)") { Gitlab::Ci::Parsers::Test::Junit.new.parse!(xml_499_995, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
x.report("old (599_994)") { Gitlab::Ci::Parsers::Test::JunitOld.new.parse!(xml_599_994, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
x.report("new (599_994)") { Gitlab::Ci::Parsers::Test::Junit.new.parse!(xml_599_994, Gitlab::Ci::Reports::TestSuite.new(name: 'rspec'), job: build) }
end
Rehearsal -------------------------------------------------
old (99_999) 3.964628 0.157550 4.122178 ( 4.125462)
new (99_999) 19.928394 1.695785 21.624179 ( 21.638089)
old (499_995) 24.176253 0.858312 25.034565 ( 25.048837)
new (499_995) 115.563664 9.090107 124.653771 (124.785084)
old (599_994) 29.349552 1.115125 30.464677 ( 30.482866)
new (599_994) 142.728930 9.741015 152.469945 (152.558578)
-------------------------------------- total: 358.369315sec
user system total real
old (99_999) 3.864758 0.090690 3.955448 ( 3.962203)
new (99_999) 19.564308 1.922708 21.487016 ( 21.530778)
old (499_995) 23.317672 0.875824 24.193496 ( 24.207072)
new (499_995) 117.327847 9.135210 126.463057 (126.536206)
old (599_994) 30.630243 1.116499 31.746742 ( 31.766611)
new (599_994) 127.149703 4.590506 131.740209 (131.837535)