# Rwb 0.2.1

**URL:** <https://www.ruby-forum.com/t/rwb-0-2-1/94710>\
**Category:** Ruby\
**Created:** [December 2, 2005, 6:25pm UTC](https://www.ruby-forum.com/t/rwb-0-2-1/94710 "2005-12-02T18:25:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat.eyler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/edb3f5/32.png) [@pat.eyler](https://www.ruby-forum.com/u/pat.eyler)\
**Post date:** [December 2, 2005, 6:25pm UTC](https://www.ruby-forum.com/t/rwb-0-2-1/94710/1 "2005-12-02T18:25:53Z")

</div>

RWB, the Ruby Web Bench, provides a simple way to  
manage a performance and load tests suite for your  
webserver. Unlike ab, by which it was inspired, it  
will allow you to build a collection of test URLs with  
corresponding weights which it will use to generate the  
actual tests that it runs (and reports on).

Version 0.2.1 was released this morning, and is available  
from [http://rubyforge.org/projects/rwb](http://rubyforge.org/projects/rwb)

There are some underlying changes to how request  
results are stored (which will allow even richer reporting  
in the future). I’ve also adding some (ascii) graphs of  
performance quartiles, for example the script below:

require ‘rwb’

urls = RWB::Builder.new()  
urls.add\_url(10, “[http://www.example.com](http://www.example.com)”)  
urls.add\_url(10, “[http://www.example.com/nonesuch](http://www.example.com/nonesuch)”)  
urls.add\_url(70, “[http://www.example.com/entries](http://www.example.com/entries)”)

queries = [‘foo+bar’, ‘bar+baz’, ‘quux’]  
urls.add\_url\_group(10, “[http://www.example.com:3000/search?](http://www.example.com:3000/search?)”, queries)

tests = RWB::Runner.new(urls, 100, 20)  
tests.report\_header  
tests.report\_overall  
tests.graph\_quartiles\_urls(1000)

generates output like this:  
$ ruby -Ilib quick.rb  
completed 10 runs  
completed 20 runs  
completed 30 runs  
completed 40 runs  
completed 50 runs  
completed 60 runs  
completed 70 runs  
completed 80 runs  
completed 90 runs  
completed 100 runs  
Concurrency Level: 20  
Total Requests: 100  
Total time for testing: 2.021048 secs  
Requests per second: 49.4792800566835  
Mean time per request: 236 msecs  
Standard deviation: 342  
Overall results:  
Shortest time: 30 msecs  
25.0%ile time: 74 msecs  
50.0%ile time: 98 msecs  
75.0%ile time: 185 msecs  
Longest time: 1281 msecs  
[http://www.example.com](http://www.example.com):  
0: ±| :1000  
[http://www.example.com/nonesuch:](http://www.example.com/nonesuch:)  
0: [|±—| :1000  
[http://www.example.com/entries:](http://www.example.com/entries:)  
0:[ |±-| :1000  
[http://www.example.com:3000/search?:](http://www.example.com:3000/search?:)  
0: |------±-------------------------------------:1000

(Additional examples of use can be seen at [www.red-bean.com/~pate/](http://www.red-bean.com/~pate/)
