Project

loadaboy

0.0
No commit activity in last 3 years
No release in over 3 years
LoadaBoy is a load testing gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.1.1
 Project Readme

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 © 2010 Jell. See LICENSE for details.