Package com.bw.jtools.profiling
Class ClassProfilingInformation
- java.lang.Object
-
- com.bw.jtools.profiling.ProfilingInformation
-
- com.bw.jtools.profiling.IdentifiableProfilingInformation
-
- com.bw.jtools.profiling.ClassProfilingInformation
-
public final class ClassProfilingInformation extends IdentifiableProfilingInformation
Holds profiling information about a class during run-time.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringnameThe name of the class.static booleanSIMPLE_NAMESGlobal flag to control class name usage.
If "true", simple class names are used.-
Fields inherited from class com.bw.jtools.profiling.IdentifiableProfilingInformation
ID
-
Fields inherited from class com.bw.jtools.profiling.ProfilingInformation
calls, maxMeasurement, minMeasurement, recursiveCalls, sum
-
-
Constructor Summary
Constructors Constructor Description ClassProfilingInformation(java.lang.String name)Creates a new Class Information object.
-
Method Summary
Modifier and Type Method Description voidclear()Clear profiling information.static voidclearProfilingInformation()Clear all profiling information from class/method information.static java.util.List<ClassProfilingInformation>getClassInformation()Get all class profiling information.static ClassProfilingInformationgetClassInformation(java.lang.String clazz)Get the class information for the module/class.
If feasible, useThreadProfilingInformation.getClassInformation(java.lang.String), especially if the thread information instance is already in use.java.util.List<MethodProfilingInformation>getMethodInformation()Gets all methods .
The method is thread-safe.MethodProfilingInformationgetMethodInformation(java.lang.String methodName)Gets or creates the information object for the method.
The method is thread-safe.static java.util.DategetProfilingStartTime()Get start date and time.-
Methods inherited from class com.bw.jtools.profiling.ProfilingInformation
addCall
-
-
-
-
Method Detail
-
getClassInformation
public static java.util.List<ClassProfilingInformation> getClassInformation()
Get all class profiling information.- Returns:
- The list of class information.
-
clearProfilingInformation
public static void clearProfilingInformation()
Clear all profiling information from class/method information.
-
getProfilingStartTime
public static java.util.Date getProfilingStartTime()
Get start date and time.- Returns:
- The current system time of start of profiling.
-
getClassInformation
public static ClassProfilingInformation getClassInformation(java.lang.String clazz)
Get the class information for the module/class.
If feasible, useThreadProfilingInformation.getClassInformation(java.lang.String), especially if the thread information instance is already in use. Use of the thread-local ThreadProfilingInformation-instance can reduce synchronization overhead.- Parameters:
clazz- The class. The simple name if SIMPLE_NAMES is active, otherwise the full name.- Returns:
- The class information instance.
-
getMethodInformation
public java.util.List<MethodProfilingInformation> getMethodInformation()
Gets all methods .
The method is thread-safe.- Returns:
- The Methods
-
getMethodInformation
public MethodProfilingInformation getMethodInformation(java.lang.String methodName)
Gets or creates the information object for the method.
The method is thread-safe.- Parameters:
methodName- The name of the method.- Returns:
- The Method-Information instance
-
clear
public void clear()
Description copied from class:ProfilingInformationClear profiling information.- Overrides:
clearin classProfilingInformation
-
-