Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Api agent

Moderators: Vladimir Kondratyev, Anton Katilin

Api agent

Postby Gustavo Woltmann » Wed Feb 24, 2016 11:44 pm

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) {
} finally {
Gustavo Woltmann
Posts: 2
Joined: Wed Feb 24, 2016 6:36 pm

Re: Api agent

Postby Anton Katilin » Thu Feb 25, 2016 4:32 pm

Yes. Please use the profiler API, class com.yourkit.api.Controller:


As an alternate solution, please consider triggers on method invocation:
Anton Katilin
Posts: 5741
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 17 guests