sub printAccessLog {
&PrintContract;
if ($totalEntries != 0) {
print RSCrpt "Log Stats for $startMonth/$startDay/$longStartYear to $endMonth/$endDay/$longEndYear\n";
print RSCrpt "TESTING = " . $startMonth . $startDay . longStartYear . "\n";
print RSCrpt "Average CGI response time by page name:\n";
print RSCrpt "\n";
# print "
| Page Name | Average Response Time in seconds | Page Accesses |
\n";
print RSCrpt "Page Name Page Accesses\n";
# sub avgrsp_pg_by_value {$avgRspTimePg{$b} <=> $avgRspTimePg{$a} }
# @keypg = sort avgrsp_pg_by_value keys(%avgRspTimePg);
sub avgrsp_pg_by_value {$pageCount{$b} <=> $pageCount{$a} }
@keypg = sort avgrsp_pg_by_value keys(%pageCount);
foreach(@keypg) {
$prevValue = $contract_number;
# printf "| %s | %-23.3f | %s |
\n", $_, $_, $avgRspTimePg{$_}, $pageCount{$_};
printf RSCrpt "| %s | %s |
\n", $_, $_, $pageCount{$_};
}
print RSCrpt "| |
\n";
# $avgRspTimeFile = $totalRspTime / $totalEntries;
# printf "| Average CGI response time = %.3f |
\n", $avgRspTimeFile;
printf RSCrpt "Total Mainframe Calls = %s\n", $mfcalls;
if (!$memberBoolean) {
@IDs = keys(%uniqueIds);
$length = @IDs;
printf RSCrpt "Total Unique IDs = %s\n", $length;
}
# print RSCrpt "\n";
} else {
print RSCrpt "TESTING = total_entries = " . $totalEntries . "\n";
return 0;
}
print RSCrpt "TESTING != total_entries = " . $totalEntries . "\n";
return 1;
}