View Issue Details

IDProjectCategoryView StatusLast Update
0015512phplist applicationStatisticspublic26-03-13 16:14
Reporterh2b2 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.10.10 
Target Version4.0.xFixed 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():

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

to:
$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 =====
ref: http://forums.phplist.com/viewtopic.php?f=4&t=27762#p66665
TagsNo tags attached.

Activities

h2b2

04-07-10 16: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'));

With:
$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 =====
ref: http://forums.phplist.com/viewtopic.php?f=16&t=28152&p=74032#p67829

gazouteast

27-09-10 09:30

reporter   ~0051096

.

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

.