2 # Draw spectrum of HTTP transaction lengths from netgrind output
3 # (c) 2003 Martin Mares <mj@ucw.cz>, GPL'ed
9 my @k = ( 0, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 1000000000 );
15 my ($t1, $t2, $src, $dst, $ffor, $result, $cache, $queue, $length, $totaltime, $waittime, $ctype, $method, $url) = split /\s+/;
16 if ($result =~ /^\d+$/) {
18 while ($length >= $k[$i+1]) {
25 my $datafile = "gp.tmp";
26 open D, ">$datafile" or die;
27 for(my $i=0; $i<$#k; $i++) {
28 print D $k[$i], "\t", $v[$i], "\n";
32 open GP, "|gnuplot" or die;
37 set title "HTTP Transactions: Length Histogram"
38 set xlabel "Length in bytes"
39 set ylabel "Number of transactions"
41 plot "$datafile" using 1:2 title "Histogram"