View Issue Details

IDProjectCategoryView StatusLast Update
0015512phpList 3 applicationStatisticspublic26-03-13 16:14
Reporterh2b2 Assigned To 
Status resolvedResolutionfixed 
Product Version2.10.10 
Fixed in Version2.11.8 
Summary0015512: Converting statistical responsetime from seconds to h:m:s
DescriptionFeature request by gcd:
===== Start quote =====
We find the click stats useful, but the responsetime displayed by /admin/mviews.php is in seconds, and therefore difficult for a human to process. We've convert it to hours:minutes:seconds by changing line 136 (in v2.10.10) to use gmdate():

$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$row['responsetime'].' '.$GLOBALS['I18N']->get('sec'));

$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),gmdate("H:i:s", $row['responsetime']));

Might want to consider that for future versions.
Thanks for the great tool! :D
===== End quote =====
TagsNo tags attached.



04-07-10 17:14

manager   ~0051052

On a similar note dlynes suggests this mod:

===== Start quote =====

I've modified the code to show response time in days, hours, minutes and seconds instead of just seconds.

It may or may not be good for languages other than English or French, as I'm not using the I18N globals array for the separators, but I hope you still find the code useful:

Replace line 136 in mviews.php:
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$row['responsetime'].' '.$GLOBALS['I18N']->get('sec'));

$rtdays=(int)($row['responsetime']/3600/24) ;
$rthours=(int)(($row['responsetime']-$rtdays*3600*24)/3600) ;
$rtminutes=(int)(($row['responsetime']-$rtdays*3600*24-$rthours*3600)/60) ;
$rtseconds=($row['responsetime']-$rtdays*3600*24-$rthours*3600-$rtminutes*60) ;
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$rtdays . 'd:' . $rthours . 'h:' . $rtminutes . 'm:' . $rtseconds . 's');

===== End quote =====


27-09-10 10:30

reporter   ~0051096


+1 requesting this switch to human-understandable periods, rather than just number of seconds