GithubHelp home page GithubHelp logo

hulk_smash's Introduction

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.

hulk_smash's People

Stargazers

Michael Pope avatar Youssef Chaker avatar Mario Andrés avatar Matt Simpson avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.