cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dariusz Łuksza <dariusz.luk...@gmail.com>
Subject Re: [c3 monitoring] Statistics module.
Date Tue, 04 Aug 2009 19:09:57 GMT
On Fri, Jul 31, 2009 at 12:11 AM, Reinhard Pötz<reinhard@apache.org> wrote:
> Dariusz Łuksza wrote:
>> Hi all,
>>
>> Currently I'm finishing milestone 3 (actually it is "cache overview")
>> of my GSoC project and I've started to wondering about last part of
>> this project: statistics module.
>>
>> I want that this module would be as much useful as it could be, so the
>> main question is what statistics should be exposed in this module ?
>>
>> One proposition is monitoring of cache. Showing what cache entry's are:
>> * most often read
>> * most often generated
>>
>> I think that having some informations about pipeline usage would be
>> also useful. Right now I think that exposing hit count for every named
>> (it means that it has set "jmx-group-name" parameter) pipeline. This
>> would be useful for proper cache configuration.
>>
>> Any other propositions ?
>
> I think it is a good idea to get an overview of all cache entries that
> are never used at all.
>
> Also a general request counter would be useful (number of request in the
> last 5 minutes, 60 minutes, 24 hours, since system start).

In attachment is a patch that adds that functionality but
unfortunately it doesn't work because of ClassCastException. Here is
part of stack trace:

java.lang.ClassCastException:
org.apache.cocoon.monitoring.statistics.RequestCounter cannot be cast
to org.apache.cocoon.monitoring.statistics.RequestCounter
	at org.apache.cocoon.servlet.XMLSitemapServlet.lazyInitialize(XMLSitemapServlet.java:257)
	at org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:98)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
	at org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy21.service(Unknown Source)

I cannot obtain bean
"org.apache.cocoon.monitoring.statistics.RequestCounter" from
BeanFactory. For me this a very strange thing because exception is
saying: "Cannot cast class A to class A" WTF ? :|

> Finally a list of all available properties (see the settings bean) would
> be a good idea.
>

This feature is currently implemented and I even add patch to jira COCOON3-33 ;)

-- 
Best regards

Blog: http://luksza.org
LinkedIn: http://www.linkedin.com/in/dariuszluksza

Mime
View raw message