Created
April 20, 2011 23:14
-
-
Save kowsik/933315 to your computer and use it in GitHub Desktop.
Integrate Blitz into your test frameworks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'blitz' | |
require 'pp' | |
# Run a sprint | |
require 'blitz' | |
sprint = Blitz::Curl.parse('-r california www.example.com') | |
result = sprint.execute | |
pp :duration => result.duration | |
# Or a Rush | |
rush = Blitz::Curl.parse('-r california -p 10-50:30 www.example.com') | |
rush.execute do |partial| | |
pp [ partial.region, partial.timeline.last.hits ] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment