[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.hyades] Re: Automate Profiling

Richard, Thank you for your reply. Here is what I have done.

I am able to target JUNIT code with my probes and start and stop the
profiler. But I do not see any data collected by the client workbench (which
is attached and monitoring this JUNIT test launched with agent in
application mode). I think I am not using the Profiler class correctly. Here
is the code:

          try {
               Profiler p = Profiler.getProfiler();
               if (p!=null) {
                    p.setMode(Profiler.PROFILER_EXECUTION_AND_HEAP);
                    p.startProfiling(false, 0);
                    System.out.println("started profiling");
                    p.markHeap();
                    p.analyzeHeap("some heap");
                    Profiler.emitXMLFragment("<XYZ/>");
                    p.runGC();
          } catch (Exception e) {
                   System.out.println("exception occurred " +
e.getMessage());
          }

If you can point me to an example, it would be really helpful.

Thanks,
Manmohan
"Richard Duggan" <rduggan@xxxxxxxxxx> wrote in message
news:cjf3ub$fje$1@xxxxxxxxxxxxxx
> There is no built in integration into the Junit tests to bootstrap the
> profiler.  I suppose you could write a probe, using the probekit in
Hyades,
> which targets the JUNIT code.  This probe would control the profiler.
>
>
> "Manmohan Gupta" <manmohangupta_2000@xxxxxxxxx> wrote in message
> news:ciqcvk$kem$1@xxxxxxxxxxxxxx
> > Is there a way to write JUNIT tests which uses Hyades to collect
profiling
> > data?
> > I am able to profile my plugins using Hyades but I would like to
automate
> > this as a regression suite.
> >
> > Thanks, I will appreciate any pointers.
> >
> >
>
>