[ 
https://issues.apache.org/jira/browse/GERONIMO-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531795
 ] 

Joe Bohn commented on GERONIMO-2775:
------------------------------------

Viet,  Thanks for the new patch.  Things still aren't right with Jetty.  The 
late binding is better since we're not running stats from the start.  However, 
it still appears that we don't really disable the stats when "stop" is invoked 
on the StatisticsHandler.  I think we need ask on the Jetty list the proper way 
that the StatisticsHandler is supposed to behave since there appear to be some 
bugs.

On the patch itself here are a few suggestions:
- It may not be necessary to iterate thru the handlers looking for the 
statisticsHandler prior to adding it.  Also, it really doesn't seem necessary 
to iterate thru all of the handlers on each request to enable or disable 
collection of statistics.  Since this is the only area of the code that would 
set the handler something simple like this should be all that is necessary:
{noformat}
            if (on) {
                // set the statistics handler if not already done so
                if (!statsHandlerInPlace) {
                    handlerCollection.addHandler(statsHandler);
                    statsHandlerInPlace = true;
                }
         ...
{noformat}

Also, the calculating of the starttime seems inefficient and will produce 
slightly different results on each stat.  Perhaps we should calculate the start 
time once and apply it to all fields or maybe better just add the start time in 
 setCollectStatistics() using the current GMT rather than calculating at all.  
Also, the last sample time isn't quite correct since we really don't know when 
the last sample actually was taken .... I suppose a guess based on the current 
time is better than nothing but I wonder if there is something better.


> Enabling web statistics collection for jetty fails from the admin console
> -------------------------------------------------------------------------
>
>                 Key: GERONIMO-2775
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2775
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: console, Jetty
>    Affects Versions: 2.0.x
>         Environment: 2.0-SNAPSHOT jetty6 jee5 assembly
>            Reporter: Paul McMahan
>            Assignee: Joe Bohn
>         Attachments: geronimo-2775.patch, geronimo-2775.patch, 
> geronimo-2775.patch, geronimo-2775.patch
>
>
> in the Web Server Manager portlet in the jetty assembly click on the "enable" 
> link for enabling statistics collection.  The click is ignored.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to