You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Viet Hung Nguyen (JIRA)" <ji...@apache.org> on 2007/09/28 23:10:51 UTC

[jira] Created: (GERONIMO-3490) Missing Jetty Connector stats

Missing Jetty Connector stats
-----------------------------

                 Key: GERONIMO-3490
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: Jetty
    Affects Versions: 2.1
         Environment: windows xp
            Reporter: Viet Hung Nguyen


Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Updated: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Viet Hung Nguyen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Viet Hung Nguyen updated GERONIMO-3490:
---------------------------------------

    Attachment: geronimo-3490b.patch

Anita, I tested the jetty connectors by turning it on from the jmxviewer also. I also get a NPE, but the operation actually turns the stats on. What I have realized from playing around with the jetty connector stats is that the statistics updates after you close the browser. So if you restart your browser and log back in to view the stats, the numbers should be jumping. 

I have attached a new patch which reflects the accurate startTime and lastsampletime attributes. I did some math to get the accurate startTime because I looked in jetty's source code and found out that there is a variable labeled 'statsStartedAt'

however, there isn't a method to get that exact value. there is getStatsOnMs() which returns exactly 

System.currentTime() - statsStartedAt (which is the total time that the stats have been collecting for)

So I did some manipulation on it to get just 'statsStartedAt.'

And I think having Start Time: Wed Dec 31 19:00:00 EST 1969 is very confusing too. So an empty string like you suggested  or something like "---" would also work.

Also, the jetty container stats are actually on by default. I have discussed this issue with joe, and we are still trying to figure out a good way to keep it off by default.

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535389 ] 

Anita Kulshreshtha commented on GERONIMO-3490:
----------------------------------------------

I have changed isStatisticsProvider to mean stats capable for now. We might have to revisit this later. 
The components that provide statistics on demand now implement LazyStatisticsProvider (suggestion for better name welcome). 
committed in rev 585308


> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531319 ] 

Anita Kulshreshtha commented on GERONIMO-3490:
----------------------------------------------

hmm.... something does not seem right - 
- The start time should not change with every sample. 
- The lastSample time is updated with every click, but other values are not being updated. I would expect at least requestCount to be updated 
  on every click just like the containerStats.   
- If the stats are always on, what are statsStartedAt and statsOn(), and collectStatistics are for?

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Viet Hung Nguyen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532491 ] 

Viet Hung Nguyen commented on GERONIMO-3490:
--------------------------------------------

Anita, I just tested out the new jetty connector stats. I think the stats seem to work. 

However, my biggest concern now is how you changed the isStatisticsProvider attribute to depend on whether or not stats are actually being collected. By default, Jetty Connector stats will be turned off, therefore the isStatisticsProvider attribute for all jetty connectors will be false. If I was someone who was not familiar with which stats Geronimo was capable of providing, I will not be able to tell that Geronimo does in fact surface jetty connector stats.

I think a way around this is to have another method (e.g. isStatsOn()) while isStatisticsProvider is always true for mbeans that CAN provide statistics. This way, the user can just query for all StatisticsProvider mbeans and turn them on/off according to their likings. 

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531240 ] 

Anita Kulshreshtha commented on GERONIMO-3490:
----------------------------------------------

Thanks Viet for the patch! I played around with the patch a bit and have a  few more suggestions:
- 1. You should not need to compute the startTime from LastSampleTime.
- 2. When the statistics are not being collected, the starttime/LastsampleTime shows:   
Start Time: Wed Dec 31 19:00:00 EST 1969, i.e. the value 0. I am OK with all 0's in 'Empty' stats. We could change our stats portlet to display " for 0 ms. WDYT? 
- 3. Since the stats are disabled by default, I had to either go to 'webserver' page to enable the container stats or set 'collectStatistics' attribute via JMXViewer. After that I was able to view JettyContainerStats from JMXViewer. I could not enable the connector stats from the console because the operation "statsOn' threw exception. I could not view any real connector data. Do you think we should add an enableStats button to "stats" page in JMXViewer?
     It would be nice if you could fix #1.
   
   

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>         Attachments: geronimo-3490.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Assigned: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anita Kulshreshtha reassigned GERONIMO-3490:
--------------------------------------------

    Assignee: Anita Kulshreshtha

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Closed: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anita Kulshreshtha closed GERONIMO-3490.
----------------------------------------


> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>             Fix For: 2.1
>
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Updated: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Viet Hung Nguyen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Viet Hung Nguyen updated GERONIMO-3490:
---------------------------------------

    Attachment: geronimo-3490.patch

this patch surfaces the jetty connector statistics using jsr 77's standards

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>         Attachments: geronimo-3490.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Viet Hung Nguyen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531512 ] 

Viet Hung Nguyen commented on GERONIMO-3490:
--------------------------------------------

The start time does not change with every sample. The formula I used was 

getStatsOnMs() * (-1) + System.currentTime() = (System.currentTime - statsStartedAt) * (-1) + System.currentTime()
                                                                                   = statsStartedAt <== what we want

The lastSampleTime is updated every click because jetty does not provide that...we do with System.currentTime(). Anything that jetty provides for jetty connectors is not updated until after the browser is closed. Also, there are some statistics (i.e. busyThreads, bytesReceived, bytesSent, requestTime) that Jetty does not provide although it may seem like it from our current implementation. Should we throw an UnsupportedException or move these stats to just the tomcat specific code or something else?

Also the Jetty Container stats does not always have to be on. I believe you can turn them off, we just haven't been able to configure it to do so. But that should probably be discussed in another jira.

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Resolved: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Viet Hung Nguyen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Viet Hung Nguyen resolved GERONIMO-3490.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>             Fix For: 2.1
>
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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


[jira] Commented: (GERONIMO-3490) Missing Jetty Connector stats

Posted by "Anita Kulshreshtha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532452 ] 

Anita Kulshreshtha commented on GERONIMO-3490:
----------------------------------------------

A substantially modified version of the patch applied to rev 581936. I do not have a working build, please test
with JMXViewer.

> Missing Jetty Connector stats
> -----------------------------
>
>                 Key: GERONIMO-3490
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3490
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Jetty
>    Affects Versions: 2.1
>         Environment: windows xp
>            Reporter: Viet Hung Nguyen
>            Assignee: Anita Kulshreshtha
>         Attachments: geronimo-3490.patch, geronimo-3490b.patch
>
>
> Jetty6 provides connector statistics, but they are not being surfaced in Geronimo's source code.

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