Re: [Fwd: PHP Peer - Benchmark - timer.php]

From: Date: Mon, 15 Sep 2003 17:17:33 +0000
Subject: Re: [Fwd: PHP Peer - Benchmark - timer.php]
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21518@lists.php.net to get a copy of this message
reading about Benchmark_Timer, i'm still confused about getProfiling()... getProfiling returns this array: Array (
    [0] => Array
        (
            [name] => Start
            [time] => 1063645824.24620900
            [diff] => -
            [total] => 1063645824.246209
        )
    [1] => Array
        (
            [name] => Stop
            [time] => 1063645824.24626300
            [diff] => 0.000054
            [total] => 1063645824.246263
        )
    [2] => Array
        (
            [name] => bla
            [time] => 1063645824.24627800
            [diff] => 0.000015
            [total] => 1063645824.246278
        )
what's the difference between [time] and [total]? looks like total only has 2 less digits, but both have the same values. wouldn't it make more sense that [total] contains the elapsed time until that moment?! in this case this would be [0][total]=>0 [1][total]=>0.000054 [2][total]=>0.000069 and so on... bye, stephan Sebastian Bergmann wrote:
Opinions? ------------------------------------------------------------------------ Subject: PHP Peer - Benchmark - timer.php From: <k2s@k2s.sk> Date: Mon, 11 Aug 2003 11:07:19 +0200 To: sb@sebastian-bergmann.de i am using your timer.php in a php script what is running as a background process the output is grabbed to a file, what i use to check the working results your getOutput function will detect, that the outout should not be a html output but i need that i suggest a optional parameter, like:
    function getOutput($set_http=null)
    {
        if (function_exists('version_compare') &&
            version_compare(phpversion(), '4.1', 'ge'))
        {
            $http = isset($_SERVER['SERVER_PROTOCOL']);
        } else {
            global $HTTP_SERVER_VARS;
            $http = isset($HTTP_SERVER_VARS['SERVER_PROTOCOL']);
        }
        if (!is_null($set_http))
        	$http = $set_http;
..... thak you, for your work, Martin Minka


« previous php.pear.dev (#21518) next »