aTraffic)) { // Simple counts $text .= "\n\n"; $text .= "\n"; foreach ($this->aTraffic as $key => $aVals) { $text .= "\n"; if (isset($this->aTrafficWho[$key])) { $text .= "\n"; } } $text .= "
Item Count   
" . $key . " " . $aVals['Count'] . "  
Callers: "; $bFirst = true; foreach ($this->aTrafficWho[$key] as $sWho) { if ($bFirst) { $bFirst = false; } else { $text .= "
\n"; } $text .= $sWho; } $text .= "

\n"; } // // Fancy timed counts // if (count($this->aTrafficTimed)) { $text .= "\n\n"; $text .= " \n"; foreach ($this->aTrafficTimed as $key => $aVals) { if (strpos($key, 'TRAF_CAL') === 0) { continue; } $text .= ""; if ($aVals['Count'] && isset($aVals['Time']) && $aVals['Time']) { $sTot = number_format($aVals['Time'] * 1000.0, 4); $sAvg = number_format($aVals['Time'] * 1000000.0 / $aVals['Count'], 1); $sMin = number_format($aVals['Min'] * 1000000.0, 1); $sMax = number_format($aVals['Max'] * 1000000.0, 1); } else { $sTot = $sAvg = $sMin = $sMax = ''; } $text .= "\n"; if (isset($this->aTrafficWho[$key])) { $text .= "\n"; } } $cal1 = number_format($this->calPassOne * 1000000.0, 1); $cal2 = number_format($this->calPassBoth * 1000000.0, 1); $cTot = number_format($this->calTime * 1000.0, 4); $text .= "\n"; $text .= "
Item Count  Tot Time (ms)  Avg Time (us)  Min Time (us)  Max Time (us) 
" . $key . " " . $aVals['Count'] . " " . $sTot . "  " . $sAvg . "  " . $sMin . "  " . $sMax . " 
Callers: "; $bFirst = true; foreach ($this->aTrafficWho[$key] as $sWho) { if ($bFirst) { $bFirst = false; } else { $text .= "
\n"; } $text .= $sWho; } $text .= "
Note: These times have been decreased by the calibration offset:
$cal2 usec per call(start,stop); $cal1 usec per call(start). Total adjustment: $cTot msec.

\n"; }