class Blitz::Curl::Rush

Use this to run a rush (a load test) against your app. The return values include the entire timeline containing the average duration, the concurrency, the bytes sent/received, etc.

Public Instance Methods

execute(&block) click to toggle source

Primary method for running a rush. The args is very similar to what the Sprint.execute method accepts, except this should also contain the pattern. If a block is given, it’s invoked periodically with the partial results of the run (to report progress, perhaps)

result = Blitz::Curl.parse('-r california -p 10-50:30 www.example.com').execute do |partial|
    pp [ partial.region, partial.timeline.last.hits ]
end

You can easily export the result to JSON, XML or compute the various rates, etc.

# File lib/blitz/curl/rush.rb, line 108
def execute &block # |result|
    queue
    result &block
end