Mutalisk

Mutalisk is a simple yet powerful HTTP API benchmarking tool.

Mutalisk emulates wrk, combines the power of multi-threading and IO-multiplexing.

Installation

Add this line to your application's Gemfile:

gem 'mutalisk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mutalisk

Usage

Do it in wrk style:

$ mutalisk -d 5 -t 2 -c 50 --latency http://v2.same.com/channel/1070566/senses

Sample output:

Running 5s test @ http://v2.same.com/channel/1070566/senses
  2 threads and 50 connections
+----------+------------+---------------+--------------------+------------------------------------------------+
| time     | bytes_read | requests_sent | responses_received | errors                                         |
+----------+------------+---------------+--------------------+------------------------------------------------+
| 5.012713 | 27876713   | 1225          | 1175               | {:read=>0, :write=>0, :connect=>0, :status=>0} |
+----------+------------+---------------+--------------------+------------------------------------------------+
  Latency Distribution
   50%    159.21ms
   75%    217.85ms
   90%    280.15ms
   95%    344.61ms
   99%    523.09ms
  1175 requests in 5.01s, 26.58MB read
Requests/sec:   234.40
Transfer/sec:     5.30MB

Side by side comparison with wrk:

$ wrk -d 5 -t 2 -c 50 --latency http://v2.same.com/channel/1070566/senses
Running 5s test @ http://v2.same.com/channel/1070566/senses
  2 threads and 50 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   238.27ms  370.89ms   2.07s    96.00%
    Req/Sec   131.30      9.78   142.00     70.00%
  Latency Distribution
     50%  154.93ms
     75%  197.59ms
     90%  321.57ms
     99%    2.07s
  1241 requests in 5.01s, 28.00MB read
Requests/sec:    247.51
Transfer/sec:      5.58MB

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/forresty/mutalisk.