- Added logging to file of execution times.
1 parent 9a3cefb commit 2792bce0b41f97b63d7ad7c0b04c737ddbf30f9d
nstanger authored on 16 May 2006
Showing 3 changed files
View
4
Repositories/Maps/css_map.pl
 
print '<div style="position:absolute; left:1px; bottom:1px; font-size:small;">';
print 'Map generated in ' . ( $finish_time - $start_time ) . ' ms</div>' . "\n";
 
open RESULTS, ">>/tmp/css_results_$num_entries.txt" or die "Argh!\n";
print RESULTS ( $finish_time - $start_time ) . "\n";
close RESULTS;
 
sub round
{
my ($n) = shift;
return int( $n + 0.5 * ( $n <=> 0 ) );
View
4
Repositories/Maps/gd_map.pl
$height - 15,
'Map generated in ' . ( $finish_time - $start_time ) . ' ms',
$black );
 
open RESULTS, ">>/tmp/gd_results_$num_entries.txt" or die "Argh!\n";
print RESULTS ( $finish_time - $start_time ) . "\n";
close RESULTS;
 
binmode(STDOUT);
 
print $mapimage->jpeg();
 
View
11
Repositories/Maps/google_map_generate_data.pl
#!/usr/bin/env perl
use strict;
use Time::HiRes qw( gettimeofday );
use CGI;
use DBI;
use Geo::IP;
 
my ( $start_sec, $start_micro ) = gettimeofday;
my ($start_time) = ( $start_sec * 1000 ) + round( $start_micro / 1000 );
 
my ($page);
 
# Database connection.
 
$stat->finish();
$connect->disconnect();
 
my ( $finish_sec, $finish_micro ) = gettimeofday();
my ($finish_time) = ( $finish_sec * 1000 ) + round( $finish_micro / 1000 );
 
open RESULTS, ">>/tmp/google_results_$num_entries.txt" or die "Argh!\n";
print RESULTS ( $finish_time - $start_time ) . "\n";
close RESULTS;
 
sub round
{
my ($n) = shift;
return int( $n + 0.5 * ( $n <=> 0 ) );