| [ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_handlers/traffic_class_display.php,v $ 14 | $Revision: 1.2 $ 15 | $Date: 2005/12/14 17:37:34 $ 16 | $Author: sweetas $ 17 +----------------------------------------------------------------------------+ 18 */ 19 20 if (!defined('e107_INIT')) { exit; } 21 22 // 23 // This is the content-code for e107_traffic::Display() 24 // It is separated out to avoid parsing when not in debug mode 25 // 26 // See traffic_class.php 27 // 28 29 if (count($this->aTraffic)) { // Simple counts 30 $text .= "\n<table class='fborder'>\n"; 31 $text .= "<tr><td class='fcaption' style='width:15%'>Item</td> 32 <td class='fcaption' style='text-align:right;width:15%'>Count </td> 33 <td class='fcaption'> </td> 34 </tr>\n"; 35 foreach ($this->aTraffic as $key=>$aVals) { 36 $text .= "<tr> 37 <td class='forumheader3'>". 38 $key."</td> 39 <td class='forumheader3' style='text-align:right;width:20%'>". 40 $aVals['Count']." </td><td class='forumheader3'> </td></tr>\n"; 41 42 if (isset($this->aTrafficWho[$key])) { 43 $text .= "<tr><td class='forumheader3' valign='top'>Callers:</td> 44 <td class='forumheader3' colspan='2'>"; 45 $bFirst=TRUE; 46 foreach ($this->aTrafficWho[$key] as $sWho) { 47 if ($bFirst ) { 48 $bFirst = FALSE; 49 } else { 50 $text .= "<br />\n"; 51 } 52 $text .= $sWho; 53 } 54 $text .= "</td></tr>\n"; 55 } 56 57 } 58 $text .="</table><br />\n"; 59 } 60 // 61 // Fancy timed counts 62 // 63 if (count($this->aTrafficTimed)) { 64 $text .= "\n<table class='fborder'>\n"; 65 $text .= "<tr><td class='fcaption'>Item</td><td class='fcaption'>Count </td> 66 <td class='fcaption'>Tot Time (ms) </td> 67 <td class='fcaption'>Avg Time (us) </td> 68 <td class='fcaption'>Min Time (us) </td> 69 <td class='fcaption'>Max Time (us) </td> 70 </tr>\n"; 71 foreach ($this->aTrafficTimed as $key=>$aVals) { 72 if (substr($key,0,8)=='TRAF_CAL') continue; 73 $text .= "<tr> 74 <td class='forumheader3'>". 75 $key."</td> 76 <td class='forumheader3' style='text-align:right'>". 77 $aVals['Count']." </td>"; 78 if ($aVals['Count'] && isset($aVals['Time']) && $aVals['Time']) { 79 $sTot = number_format($aVals['Time']*1000.0,4); 80 $sAvg = number_format($aVals['Time']*1000000.0/$aVals['Count'],1); 81 $sMin = number_format($aVals['Min']*1000000.0,1); 82 $sMax = number_format($aVals['Max']*1000000.0,1); 83 } else { 84 $sTot = $sAvg = $sMin = $sMax = ''; 85 } 86 $text .= "<td class='forumheader3' style='text-align:right'>". 87 $sTot." </td> 88 <td class='forumheader3' style='text-align:right'>". 89 $sAvg." </td> 90 <td class='forumheader3' style='text-align:right'>". 91 $sMin." </td> 92 <td class='forumheader3' style='text-align:right'>". 93 $sMax." </td> 94 </tr>\n"; 95 96 if (isset($this->aTrafficWho[$key])) { 97 $text .= "<tr><td class='forumheader3' valign='top'>Callers:</td> 98 <td class='forumheader3' colspan='5'>"; 99 $bFirst=TRUE; 100 foreach ($this->aTrafficWho[$key] as $sWho) { 101 if ($bFirst ) { 102 $bFirst = FALSE; 103 } else { 104 $text .= "<br />\n"; 105 } 106 $text .= $sWho; 107 } 108 $text .= "</td></tr>\n"; 109 } 110 111 } 112 $cal1 = number_format($this->calPassOne*1000000.0,1); 113 $cal2 = number_format($this->calPassBoth*1000000.0,1); 114 $cTot = number_format($this->calTime*1000.0,4); 115 116 $text .="<tr><td class='forumheader3' colspan='6'> 117 <b>Note:</b> These times have been decreased by the calibration offset:<br/> 118 $cal2 usec per call(start,stop); $cal1 usec per call(start). Total adjustment: $cTot msec.</td></tr>\n"; 119 $text .="</table><br />\n"; 120 } 121 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |