michael@0: #!/usr/bin/perl michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: use CGI::Carp qw(fatalsToBrowser); michael@0: use CGI::Request; michael@0: use URLTimingDataSet; michael@0: use strict; michael@0: michael@0: my $request = new CGI::Request; michael@0: my $id = $request->param('id'); #XXX need to check for valid parameter id michael@0: michael@0: print "Content-type: text/html\n\n"; michael@0: michael@0: print "
See Notes at the bottom of this page for some details.
\n"; michael@0: print "\n"; michael@0: my $rs = URLTimingDataSet->new($id); michael@0: michael@0: print "Test id: $id\n\n\n"; michael@0: michael@0: #XXX print more info (test id, ua, start time, user, IP, etc.) michael@0: michael@0: # draw the chart sorted michael@0: # XXX enable this line to draw a chart, sorted by time. However, in order michael@0: # to draw the chart, you will need to have installed the 'gd' drawing library, michael@0: # and the GD and GD::Graph Perl modules. michael@0: ###print "\n
Avg. Median : ", $rs->{avgmedian}, michael@0: " msec\t\tMinimum : ", $rs->{minimum}, " msec\n"; michael@0: print "Average : ", $rs->{average}, michael@0: " msec\t\tMaximum : ", $rs->{maximum}, " msec
\nIDX PATH AVG MED MAX MIN TIMES ...\n"; michael@0: michael@0: if ($request->param('sort')) { michael@0: print $rs->as_string_sorted(); michael@0: } else { michael@0: print $rs->as_string(); michael@0: } michael@0: print "\n"; michael@0: printEndNotes(); michael@0: michael@0: exit; michael@0: michael@0: michael@0: sub printEndNotes { michael@0: print <<"EndOfNotes"; michael@0: michael@0:
michael@0: