tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Hopson <geoff.hop...@gmail.com>
Subject Re: Performance Metrics
Date Thu, 01 Dec 2005 21:38:26 GMT
Or use JMX in Hivemind...

in hivemodule.xml

        <!-- JMX -->
        <contribution configuration-id="hivemind.EagerLoad">
                <load service-id="hivemind.management.MBeanRegistry"/>
        </contribution>


        <service-point id="statisticsService" interface="com.anite.MyService
">
                <invoke-factory>
                <construct      class="com.anite.MyServiceImpl"
                                        initialize-method="init">
                        </construct>
        </invoke-factory>
                <interceptor service-id="
hivemind.management.PerformanceMonitorFactory"></interceptor>
        </service-point>

Use the exclude directive to cut out the stuff you don't want, connect up to
port 8090 and away you go...

Geoff


On 01/12/05, Jesse Kuhnert <jkuhnert@gmail.com> wrote:
>
> I think for your uses you may find the use/getting familiar with hivemind
> the best approach. Almost every piece of the tapestry core is broken up
> into
> hivemind services, which allows you to do a lot of very cool things, the
> least of which would be taking something like this:
>
> http://jakarta.apache.org/hivemind/hivemind/LoggingInterceptor.html
>
> And turning it into a performance logging interceptor :) To apply the
> interceptor to an existing hivemind/tapestry service this is sort of what
> it
> would look like:
>
> <implementation service-id="hivemind.ThreadEventNotifier" >
>     <interceptor service-id="hivemind.LoggingInterceptor" />
>     </implementation>
>
> Hope that helps.
>
> jesse
>
> On 12/1/05, Cormier, Ross <Ross.Cormier@williams.com> wrote:
> >
> > I would like to time page loading/rendering throughout my app.  I have
> > overridded doService in ApplicationServlet which allows me to time
> > everything, too much actually.  Is it possible to use Tapestry and
> > determine what 'type' of request is being processed?  I could always
> > look at the RequestParameters and filter out assets, etc. but it would
> > be nice to use the framework.
> >
> >
> >     protected void doService(HttpServletRequest request,
> > HttpServletResponse response)
> >     throws IOException, ServletException
> >     {
> >         ToStringBuilder builder = new ToStringBuilder("",
> > MyEngine.STRING_STYLE);
> >
> >         MultiTimer.startTimer(request, 'd', "doService");
> >         super.doService(request, response);
> >         String pageInfo = ""; //I would like to figure out if the
> > request is for a page, asset, get the page's name, etc.
> >         MultiTimer.stopTimerPrint(request, 'd', "doService", pageInfo);
> >     }
> >
> >
> > Thanks,
> > Ross
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message