Topic
  • 2 replies
  • Latest Post - ‏2014-08-22T01:24:35Z by elijordan
elijordan
elijordan
2 Posts

Pinned topic RAD + Websphere App Server Profiling Programatically

‏2014-08-21T05:10:19Z |

Hi

I am using Rational Application Developer (RAD) 9.1 to do some profiling of an application running on WAS, where the WAS instance is on a remote machine. I have setup Rational Agent Controller (RAC) and can successfully obtain profiling data using the RAD profiling perspective. However, I would like to target the profiling at specific pieces of code, and automate the profiling in a performance regression test suite. 

So, my question is; Can I start and stop the collection of profiling data programmatically, from within the application code?

I know that the profiling tools in RAD are based on TPTP, and TPTP has an API to do this, so I am hoping this is also possible with the rational tools.

  • KathyChan
    KathyChan
    1 Post

    Re: RAD + Websphere App Server Profiling Programatically

    ‏2014-08-21T18:55:50Z  

    Yes.  RAD is based on TPTP.  However, we are not aware of a Java API in TPTP that the user can use to programmatically start and stop the collection of profiling data.  The user can do so through the UI but not control that programmatically. If you would like to target profiling at specific pieces of code, the best way to do that is through setting the correct filter set to limit profiling on the code you are interested in.  Please let us know if you have further question on this.

     

    Kathy Chan
    RAD Development

  • elijordan
    elijordan
    2 Posts

    Re: RAD + Websphere App Server Profiling Programatically

    ‏2014-08-22T01:24:35Z  
    • KathyChan
    • ‏2014-08-21T18:55:50Z

    Yes.  RAD is based on TPTP.  However, we are not aware of a Java API in TPTP that the user can use to programmatically start and stop the collection of profiling data.  The user can do so through the UI but not control that programmatically. If you would like to target profiling at specific pieces of code, the best way to do that is through setting the correct filter set to limit profiling on the code you are interested in.  Please let us know if you have further question on this.

     

    Kathy Chan
    RAD Development

    Thanks Kathy

    Here is a link to the javadoc for the profiler API in TPTP

    http://archive.eclipse.org/tptp/4.7.0/javadoc/Platform/public/org/eclipse/tptp/profiler/Profiler.html

    Here is an excerpt from the readme.txt in the plugins/org.eclipse.tptp.javaprofiler directory within the rational agent controller installation

    The Java Profiler can be launched from the command line by typing the following
    command at the prompt:
     
    java -agentlib:JPIBootLoader=JPIAgent[:help|<global options>];
         <profiler>[:<profiler options>] <Java Class>
     
    Where:
      help ? displays a brief usage message. For example,
      java -agentlib:JPIBootLoader=JPIAgent:help;CGProf
     
      <options> - comma-separated command line options, provided as name-value pairs.
                  Both global and profiler-specific options are supported. 
       
      Supported global options:
    ...
        api=true|false - Whether to enable the Profiler API or not. Default is false.
                         The Profiler API feature is fully supported by the 
                         Heap and Thread profilers. The feature is partially 
                         supported by the Execution Time profiler (CGProf). See the
                         CGProf section below for more information.
    ...

    Hope you can help me to get this working!