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

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: 6053
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.