Re: Profiler Implementation Example
Alejandro Revilla <
apr@...>
2007-11-09 19:50:55 GMT
Instead of creating a new Profiler you want to use the profiler provided
by your context (context.getProfiler());
On Fri, Nov 09, 2007 at 07:19:34PM -0000, johnnyoverland wrote:
> I am putting the final pieces together on our design and have some
> questions on how the Profiler works. Ultimately I am looking for an
> example of using the Profiler in a Q2 environment.
>
> I have a Q2 server listening on port 5000 and when a TXN arrives it
> fires off a GroupSelector and subsequently Participants which do
> various modifactions to the message and send to an external Host via
> a QMUX -> Channel Adaptor scenario.
>
> I have added
> <property name="checkpoint" value="testCheck"/>
> to my config files at various locations and I have also created a
> Profiler object in my RequestListeners Process method.
>
> public boolean process(ISOSource source, ISOMsg m) {
> Context ctx = new Context();
> Profiler prof = new Profiler();
> prof.checkPoint ("NACS-receive");
> prof.checkPoint ("NACS-send");
> ctx.put(cfg.get("destination","defaultDestination"),
> m);
> ctx.put(cfg.get("source","defaultSource"), source);
> Space sp = SpaceFactory.getSpace(cfg.get("space",""));
> sp.out(cfg.get("manager","defaultManager"), ctx,
> cfg.getLong("timeout",5000));
> prof.dump (System.out, "");
(Continue reading)