Is there a way to start and stop profiling from inside the profiled application itself programmatically ?
I'd like to profile a section of code only when certain application conditions are met, i.e. in app code I would like to make a temporary change and have something like this:
try {
if (app conditions) {
Profiler.startCpuProfiling();
}
....
} finally {
Profiler.captureSnapshot("snapshotfile");
}
Agent api
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am