test/node/test_front.rb in zold-0.14.18 vs test/node/test_front.rb in zold-0.14.19

- old
+ new

@@ -164,6 +164,18 @@ 750, :>, response['content-length'].to_i, 'Expected the content to be smaller than 600 bytes for gzip' ) end end + + def test_performance + start = Time.now + total = 50 + FakeNode.new(log: test_log).run(['--threads=4', '--strength=6', '--no-metronome']) do |port| + total.times do + Zold::Http.new(uri: URI("http://localhost:#{port}/"), score: nil).get + end + end + sec = (Time.now - start) / total + test_log.info("Average response time is #{sec.round(2)}s") + end end