Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

Version: 1.4.2-1-2c0f5a1 

/ opt / logstash / spec / speed.rb

require "test_utils"

describe "speed tests", :performance => true do
  extend LogStash::RSpec
  count = 1000000

  config <<-CONFIG
    input {
      generator {
        type => foo
        count => #{count}
      }
    }
    output { null { } }
  CONFIG

  start = Time.now
  agent do
    duration = (Time.now - start)
    puts "speed rate: #{"%02.0f/sec" % (count / duration)}, elapsed: #{duration}s"
  end
end