Running Tsung
First, we need to create the view that is used in the above configuration file. This is simply a view of dates (as an array of year, month, and day) from our documents:
curl -X PUT http://couch-proxy.example.com/api/_design/default -d \ '{ "language": "javascript", "views": { "dates": { "map": "function(doc) { if (doc.date) { emit(doc.date); } }", "reduce": "_count" } } }'
The response:
{ "ok":true, "id":"_design/default", "rev":"1-edb41165ec8e4839dd7918e88e2125fa" }
Start Tsung, telling it to use the above configuration file:
tsung -f ~/http_distributed_couch_proxy.xml start
Note that Tsung will wait for all sessions to complete before finishing, even if it takes longer than the duration of all phases. Tsung will let you know what directory it has logged to, for example:
"Log directory is: /home/bradley-holt/.tsung/log/20110221-23:26"
Change into the log directory and generate the HTML and graph reports using the tsung_stats.pl script package with Tsung:
/usr/lib/tsung/bin/tsung_stats.pl
Warning
The location of the tsung_stats.pl script may be different on your testing client. If so, you will need to locate this script and run it from the appropriate location.
If everything works correctly, a report.html
file will be created in this same directory. Open this report and you will see several statistics and graphs. Under the statistics reports, the main statistics table shows you the highest 10 second mean, lowest 10 second mean, highest rate, mean, and count for each part of the ...
Get Scaling CouchDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.