Try to attach jConsole to the jvm and see if the stats for the AE are shown
there. You may need to enable JMX  by
adding the following to the run command:

-Dcom.sun.management.jmxremote

JC
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Jerry Cwiklik
 UIMA Extensions
 IBM T.J.  Watson Research Center
 Hawtorne, NY, 10532
 Tel: 914-784-7665,  T/L: 863-7665
 Email: [EMAIL PROTECTED]



                                                                       
             Marshall Schor                                            
             <[EMAIL PROTECTED]>                                           
                                                                        To
             10/29/2008 12:12          [email protected]  
             PM                                                         cc
                                                                       
                                                                   Subject
             Please respond to         Re: Getting AE performance stats
             [EMAIL PROTECTED]                                         
               or.apache.org                                           
                                                                       
                                                                       
                                                                       
                                                                       




I'm not too familiar with this code.  It looks like it should work.  If
you can run in the debugger, you can probably quickly figure out what's
going wrong - try putting a stop in the AnalysisEngineManagement code
where the counters get incremented - if that's not being hit, then
there's a call/hook missing.

Are you running the PEAR from within an aggregate (an aggregate
containing only one delegate - the pear descriptor)?

-Marshall

Jörn Kottmann wrote:
> Hello,
>
> I am trying to retrieve performance stats from an AnalysisEngine
> with the AnalysisEngineManagement object instance I got via the
> AE.getManagementInterface method, but all stats are 0 e.g.
> for AEM.getNumberOfCasProcessed().
>
> I created the AE from a pear. And then this
> small loop drives the processing:
>
> CAS cas = ae.newCAS();
> while (colReader.hasNext()) {
>    colReader.getNext(cas);
>    ae.process(cas);
>    cas.reset();
> }
>
> If I now try to use the management interface I do not
> get correct stats, only zero as described above.
>
> What do I am doing wrong ? Is there a switch
> to explicitly enable performance monitoring ?
>
> I have one more question.
> Is it safe to use a second thread to retrieve the
> performance stats ?
>
> Thanks,
> Jörn
>
>
>

Reply via email to