0) { return '' . $bug_type[$status][$type] . "\n"; } } mysql_freeresult($result); echo "\n"; echo "\n"; while(list($type,$value)=each($bug_type['all'])) { echo "\n"; } echo "
Total bug entries in system:$totalClosedOpenAnalyzedSuspendedDuplicateAssigned
$type:$value".bugstats('closed', $type)." ".bugstats('open', $type)." ".bugstats('analyzed', $type)." ".bugstats('suspended',$type)." ".bugstats('duplicate', $type)." ".bugstats('assigned',$type)." 
\n"; sort($time_to_close); $c=count($time_to_close); $sum=0; for($i=0;$i<$c;$i++) { $sum+=$time_to_close[$i]; } $median = $time_to_close[(int)($c/2)]; echo "

Bug Report Time to Close Stats\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Average life of a report:".ShowTime((int)($sum/$c))."
Median life of a report:".ShowTime($median)."
Slowest report closure:".ShowTime($time_to_close[$c-1])."
Quickest report closure:".ShowTime($time_to_close[0])."
\n"; arsort($closed_by); echo "

Who is closing the bug reports?\n"; echo "\n"; while(list($who,$value)=each($closed_by)) { echo "\n"; } echo "
$who$value
\n"; arsort($email); echo "

Who is submitting bug reports?\n"; echo "\n"; while(list($who,$value)=each($email)) { echo "\n"; } echo "
$who$value
\n"; commonFooter(); ?>