Changeset 259


Ignore:
Timestamp:
Nov 6, 2009, 2:07:51 AM (11 years ago)
Author:
zerodeux
Message:

Switching to explicit formating and %F locale-indepent floats in phptop_hook

Location:
phptop
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • phptop/Makefile

    r257 r259  
    1717debclean:
    1818        fakeroot debian/rules clean
     19        rm build
    1920
    2021debupload:
  • phptop/NEWS

    r258 r259  
    66       lines sometimes)
    77    * More elegant global hits/sample counter
     8    * phptop_hook: switching to explicit formating and locale-independent
     9      %F formater - hoping it will help with the log wrapping
    810
    911phptop 0.2.1 - 2009-11-05
  • phptop/phptop_hook.php

    r256 r259  
    3636  global $_phptop_t0;
    3737  $t1   = microtime(TRUE);
    38   $time = sprintf('%.6f', $t1 - $_phptop_t0['time']);
     38  $time = $t1 - $_phptop_t0['time'];
    3939
    4040  $ru = getrusage();
     
    4949  $vhost = $_SERVER['SERVER_NAME'];
    5050  $uri   = $_SERVER['REQUEST_URI'];
    51   $self  = $proto != '' ? "$proto://$vhost$uri" : $_SERVER['SCRIPT_FILENAME'];
     51  $self  = $vhost != '' ? "$proto://$vhost$uri" : $_SERVER['SCRIPT_FILENAME'];
    5252
    53   error_log(str_replace(',', '.', "phptop $self time:$time user:$tusr sys:$tsys mem:$mem inc:$inc"));
     53  $msg = sprintf("phptop %s time:%.6F user:%.6F sys:%.6F mem:%g inc:%g\n", $self, $time, $tusr, $tsys, $mem, $inc);
     54  error_log($msg);
    5455}
    5556
Note: See TracChangeset for help on using the changeset viewer.