TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.tptp.profiler
Class Profiler

java.lang.Object
  extended by org.eclipse.tptp.profiler.Profiler

public class Profiler
extends java.lang.Object

Exposes an API for controlling the profiler. This class is a singleton and cannot be instantiated by the user. In order to access it an application must use getProfiler().


Method Summary
 void emitXMLFragment(java.lang.String xmlFragment)
          Saves the XML fragment to the output destination.
static Profiler getProfiler()
          Returns the singleton Profiler's instance.
 void runGC()
          Runs the garbage collector.
 boolean startProfiling()
          Starts data collection.
 boolean stopProfiling()
          Stops data collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProfiler

public static Profiler getProfiler()
                            throws ProfilerNotAvailableException
Returns the singleton Profiler's instance.

Returns:
Profiler
Throws:
ProfilerAPINotAvailableException - - If API is disabled
ProfilerNotAvailableException - - If native library JPIAgent not found

startProfiling

public boolean startProfiling()
                       throws ProfilerAPINotAvailableException
Starts data collection.

Returns:
true if data collection started; false otherwise
Throws:
ProfilerAPINotAvailableException - - If API is disabled

stopProfiling

public boolean stopProfiling()
                      throws ProfilerAPINotAvailableException
Stops data collection.

Returns:
true if data collection stopped; false otherwise
Throws:
ProfilerAPINotAvailableException - - If API is disabled

runGC

public void runGC()
           throws ProfilerAPINotAvailableException
Runs the garbage collector.

Throws:
ProfilerAPINotAvailableException - - If API is disabled

emitXMLFragment

public void emitXMLFragment(java.lang.String xmlFragment)
                     throws ProfilerAPINotAvailableException
Saves the XML fragment to the output destination.

Parameters:
xmlFragment - - The XML fragment to save
Throws:
ProfilerAPINotAvailableException - - If API is disabled

TPTP 4.5.0 Platform Project
Public API Specification