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