fixed broken performance tests

This commit is contained in:
Colin Surprenant 2014-03-20 00:20:53 -04:00
parent d46295ea77
commit 64c0af43ee
2 changed files with 7 additions and 3 deletions

View file

@ -447,9 +447,11 @@ describe LogStash::Filters::Grok do
CONFIG
2.times do
start = Time.now
agent do
puts "grok parse rate: #{event_count / @duration}"
insist { @duration } < max_duration
duration = (Time.now - start)
puts "grok parse rate: #{"%02.0f/sec" % (event_count / duration)}, elapsed: #{duration}s"
insist { duration } < max_duration
end
end
end

View file

@ -122,8 +122,10 @@ describe LogStash::Filters::KV do
}
CONFIG
start = Time.now
agent do
p :duration => @duration, :rate => count/@duration
duration = (Time.now - start)
puts "kv rate: #{"%02.0f/sec" % (count / duration)}, elapsed: #{duration}s"
end
end