Skip to content

Instantly share code, notes, and snippets.

@brapse
Created September 1, 2009 17:29
Show Gist options
  • Save brapse/179238 to your computer and use it in GitHub Desktop.
Save brapse/179238 to your computer and use it in GitHub Desktop.
== trample.rb ==
Trample.configure do
concurrency 20
iterations 10
base = "http://test.smarthippo.com/search/data.js"
args = {:reason => 0,
:zip_code => 90210,
:mortgage_product => "FIXED-30",
:property_value => 400_000,
:balance => 200_000,
:cash_out => 2000_000,
:dept_amount => 50_000,
:down_payment => 40_000,
:price => 200_000,
:credit_rating => 1}.map{|k, v| "#{k}=#{v}"}.join('&')
url = base + '?' + args
puts url
get url
end
== tample start trample.rb ==
INFO main: Starting trample...
/opt/local/lib/ruby/gems/1.8/gems/giraffesoft-trample-0.1.0/lib/trample/runner.rb:15:in `trample': undefined method `concurrency' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/giraffesoft-trample-0.1.0/bin/../lib/trample/cli.rb:8:in `start'
from /opt/local/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `send'
from /opt/local/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:20:in `parse'
from /opt/local/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor.rb:78:in `start'
from /opt/local/lib/ruby/gems/1.8/gems/giraffesoft-trample-0.1.0/bin/trample:6
from /opt/local/bin/trample:19:in `load'
from /opt/local/bin/trample:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment