% sprocket > out.http sprocket listening at 8080. Clear your cache before surfing.
% sprocket > out.http 2>/dev/null
2853 >>>>>>>> 1199832944.7535 GET http://patrick.net/ HTTP/1.1^M Accept-Encoding: gzip, deflate^M Host: patrick.net^M User-Agent: Mozilla/5.0 (Macintosh; U; en-US; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10^M Accept: text/xml,application/xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5^M Accept-Language: en-us^M ---------------: ------------^M Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7^M Keep-Alive: 300^M Proxy-Connection: keep-alive^M ^M 2853 <<<<<<<< 1199832945.1593 HTTP/1.1 301 Moved Permanently^M Transfer-Encoding: chunked^M Date: Tue, 08 Jan 2008 22:55:38 GMT^M Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7l PHP/4.4.0 mod_gzip/2.0.26.1a^M X-Powered-By: PHP/4.4.0^M Location: http://patrick.net/housing/crash.html^M --------------: ---^M Content-Type: text/html^M ^M 6F^M Please use http://patrick.net/housing/crash.html instead ^M 0^M ^M
% sprocket -p 8081 > out.http
% sprocket -i 10.32.0.106 > out.http
To prevent confusion, we need to sort so that each response comes immediately after its request.
% sort_http out.http > sorted.http
% sprocket > out.http % sort_http out.http > sorted.http % trim sorted.http > trimmed.http
% replay trimmed.http yyyy mm dd hh mm ss.sss latency bytes url 2008 01 08 15 08 20.876 0.227 486 http://patrick.net/
#!/bin/bash -x
((user = 0))
while ((user < 10))
do
replay trimmed.http > out$user.txt &
((user = user + 1))
perl -pi -e "s/user=user\d+/user=user$user/" trimmed.http
done
# MIN HOUR DOM MOY DOW Commands #(0-59) (0-23) (1-31) (1-12) (0-6) (Note: 0=Sun) */10 * * * * replay home.http > home.out */10 * * * * gnuplot home.gp
set term png set xdata time set timefmt "%Y %m %d %H %M" set ylabel "seconds" set title "homepage latency" set output "home.png" plot 'home.out' using 1:7 notitle with lines
| Commercial Tools | Sprocket |
|---|---|
| easy ramp up | needs command line knowledge |
| reporting included | reporting done manually |
| expensive | free |
| rigid, limited | flexible |
| proprietary test language | perl |
| proprietary data format | text |
| obscure | clear what is going on |