- do perf tests twice to avoid warm-up/compilation costs

This commit is contained in:
Jordan Sissel 2013-08-08 22:58:54 -07:00
parent d0191b2665
commit 1c4e2b84f4

View file

@ -65,9 +65,11 @@ describe LogStash::Event do
end
it "should be fast?" do
start = Time.now
100000.times { subject["[j][k1]"] }
puts "Duration: #{Time.now - start}"
2.times do
start = Time.now
100000.times { subject["[j][k1]"] }
puts "Duration: #{Time.now - start}"
end
end
end