phptop 0.5.4 released (average and relative options)

PhpTop 0.5.4 is out, with two new analysis options :

  • -a, --average: show per-hit average time values instead of cumulated time
  • -r, --relative: show relative time values in percent relative to the sample duration

Sample usage :

lampserver:~# phptop -prs user
URL                                   Hit     Time    >User      Sys  Mem/hit  Mem_max
/                                    5.4%    25.0%     5.8%     0.4%      7.5     20.5
/fr/                                 2.5%     4.0%     2.8%     0.2%      5.6     14.5
/fr/user/startpage/                  1.4%    61.9%     2.6%     0.1%     11.4     17.5
/cv/baz/                             0.6%     3.9%     1.7%     0.1%      8.4      8.8
/fr/ajax/home/change_foobar/         2.3%     5.5%     1.6%     0.2%      4.5     13.8
/fr/ajax/munch/save/                 1.8%     3.8%     1.5%     0.1%      9.2     19.0
/dont-do-this/                       0.3%     1.7%     1.3%     0.1%      9.9     10.2
/cv/barbaz/                          0.6%     2.4%     1.3%     0.1%      9.4     21.8
/fr/ajax/identity/foo_upload/        0.2%     2.0%     1.2%     0.1%      4.0      4.5
/cv/afer/                            0.5%     2.5%     1.2%     0.1%      8.2      9.2
Total (from last 300 sec)          100.0%   397.2%   112.3%     7.8%                  

Here it is more easy to see that PHP used 112% CPU for the last 300sec (this is on a 4-way server, we have up to 400% CPU time). The hit ratio is also more meaningfull to quickly see the distribution curve : the more CPU costly page only represents 5.4% of total hits, maybe you don't want to waste your time optimizing that.

It could be better, hit totals should be kept as a plain number I guess. Same for the total elapsed time.

Note that the combination of -a and -r is allowed but is not very useful nor readable.

  • Posted: 2011-08-12 16:26
  • Author: vcaron
  • Categories: (none)

Comments

No comments.