From: Michael L. <ml...@ml...> - 2005-11-23 17:58:20
|
This is a very simple mod to have the info (IMAP Server Information) plugin benchmark how long each IMAP command takes to run /plugins/info/functions.php --- info-functions.php.orig 2005-11-23 12:53:32.778393118 -0500 +++ info-functions.php.changed 2005-11-23 12:53:19.973073554 -0500 @@ -37,8 +37,13 @@ * @access private */ function imap_test($imap_stream, $string) { - print "<tr><td>".htmlspecialchars($string)."</td></tr>"; + list($timestartms,$timestarts) = explode(" ", microtime()); + $timestart=(float)$timestarts + (float)$timestartms; $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false); + list($timeendms,$timeends) = explode(" ", microtime()); + $timeend=(float)$timeends + (float)$timeendms; + $timetotal=$timeend-$timestart; + print "<tr><td>".htmlspecialchars($string)."<br><small>Running Time: $timetotal Seconds</small></td></tr>"; array_push($response, $responses . ' ' .$message); return $response; } -- Michael Long Application Development & System Planning Spirit Telecom |