LoadaBoy¶ ↑
Synopsis¶ ↑
A Load Tester that allows you to generate dynamic requests.
Requirements¶ ↑
LoadaBoy requires Erlang and RubyGems.
Installation¶ ↑
gem install loadaboy
How it works¶ ↑
-
Write a custom generator in Loadafile.rb:
Write a generator containing each request a worker needs to perform per job. The request order is respected. You can optionally give a name to the generator if you want to test different load profiles.
-
In the same folder as your Loadafile.rb, run:
loadaboy domain-name number-of-workers number-of-jobs-per-worker (generator-name)
Example¶ ↑
Loadafile.rb:¶ ↑
require 'loadaboy' def random_string(n = 10) (1..n).map{ ('a'..'z').to_a[rand(26)] }.join end def random_keywords(n = 20) (1..n).map{random_string(5+rand(20))}.join("+") end LoadaBoy.generator do request :static, "/static" request :dynamic, "/dynamic/#{rand(3)}?random_string=#{random_string}&keywords=#{random_keywords}" end LoadaBoy.generator :only_dynamic do request :dynamic, "/dynamic/#{rand(3)}?random_string=#{random_string}&keywords=#{random_keywords}" end
Run:¶ ↑
loadaboy http://localhost:3000 10 10
or
loadaboy http://localhost:3000 10 10 only_dynamic
TODO¶ ↑
-
Add options to request to customize timeout, disable keepalive etc…
Note on Patches/Pull Requests¶ ↑
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright¶ ↑
Copyright © 2010 Jell. See LICENSE for details.