Listing 3: Benchmark Program

#!/usr/bin/perl -w
use strict;
use diagnostics;
use LWP::Simple;
use Benchmark;
#
my $mod_perl_code =
 'get "http://localhost/perl-bin/mod_perl-test.pl"';
my $cgi_code =
 'get "http://localhost/cgi-bin/cgi-insert-test.pl"';
#
timethese(100, {
   'Apache::DBI' => $mod_perl_code,
   'Plain CGI' => $cgi_code
   });