Project

hulk_smash

0.01
No commit activity in last 3 years
No release in over 3 years
Hulking is the act of testing the scalability of your app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.6.0
~> 0.9.2
~> 2.8.0
~> 0.7.5
 Project Readme

Hulk Smash

Hulk is a ruby library that provides scalability and load testing, through siege.

How to use

Install Siege on the server you wish to perform the the hulking.

$ brew install siege

Install as a ruby gem, this requires ruby 1.9.3 and will install a binary to your system.

$ gem install hulk_smash

There are two things that Hulk is designed to test. Server Load and Scalability.

Defaults

Require the library, and create a new smasher.

require 'hulk_smash'
smasher = HulkSmash::Smasher.new
smasher = HulkSmash::Smasher.new 'https://myhost.com/hit_it', duration: '1m', method: :put, data: { foo: 'bar' }

Runs load test to get idea of requests per second

smasher.run_load_test
# or
smasher.load_test = true
smasher.run

smasher.result.requests_per_second # => 1327.1 
smasher.result.avg_response_time # => 10

Runs scalability test to get idea of response time

smasher.run_scalability_test
# or
smasher.run

smasher.result.requests_per_second # => 22.13 
smasher.result.avg_response_time # => 5

Custom Options

  • 1 minute
  • 100 concurrent users
  • http://some_great_host/assets/scale-test.txt
smasher = HulkSmash::Smasher.new 'http://some_great_host/assets/page_to_test', duration: '1m', concurrent_users: 100

result = smasher.run_load_test
result.requests_per_second # => 477.38
result.avg_response_time # => 150

Rspec

Create a test suite that asserts on response times and throughput. View the examples and integration specs for inspiration

The initial reason for writing this is so I can create a test suite written in ruby that tests http services notify me when we push a release that makes the services slow.

Contribute

Code

  • Fork
  • Branch for your topic / issue
  • Make pull request with updated tests

Documentation

Make the documentation better! I'd like to use Yardoc

Examples

Contribute some examples on how you use this.