]> mj.ucw.cz Git - netgrind.git/blob - post/http-extract
Implemented dumping of HTTP transactions
[netgrind.git] / post / http-extract
1 #!/usr/bin/perl
2 # Extract data from HTTP transactions
3 # (c) 2003 Martin Mares <mj@ucw.cz>, GPL'ed
4
5 use strict;
6 use warnings;
7 use POSIX;
8
9 1 == @ARGV or die "Usage: http-extract <perl-expression>";
10 eval '
11 while (<STDIN>) {
12         chomp;
13         /^#/ && next;
14         my ($t1, $t2, $src, $dst, $ffor, $result, $cache, $queue, $length, $totaltime, $waittime, $ctype, $method, $url) = split /\s+/;
15         print ' . $ARGV[0] . ', "\n";
16 }
17 ';
18 die "$ARGV[0]: $@" if $@;