|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.btrace.BTraceUtils.Profiling
public static class BTraceUtils.Profiling
Profiling support. It is a highly specialized aggregation (therefore not included in the generic aggregations support) which is able to calculate clean self time spent in hierarchically called methods (or bigger parts of code)
Constructor Summary | |
---|---|
BTraceUtils.Profiling()
|
Method Summary | |
---|---|
static Profiler |
newProfiler()
Creates a new Profiler instance |
static Profiler |
newProfiler(int expectedBlockCnt)
Creates a new Profiler instance with the specified expected count of the distinct methods to be recorded. |
static void |
printSnapshot(java.lang.String name,
Profiler profiler)
|
static void |
printSnapshot(java.lang.String name,
Profiler profiler,
java.lang.String format)
|
static void |
recordEntry(Profiler profiler,
java.lang.String blockName)
Records the entry to a particular code block |
static void |
recordExit(Profiler profiler,
java.lang.String blockName,
long duration)
Records the exit out of a particular code block |
static void |
reset(Profiler profiler)
|
static Profiler.Snapshot |
snapshot(Profiler profiler)
Creates a new snapshot of the profiling metrics collected sofar |
static Profiler.Snapshot |
snapshotAndReset(Profiler profiler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BTraceUtils.Profiling()
Method Detail |
---|
public static Profiler newProfiler()
public static Profiler newProfiler(int expectedBlockCnt)
expectedBlockCnt
- The expected count of the distinct blocks
to be recorded.
public static void recordEntry(Profiler profiler, java.lang.String blockName)
profiler
- The Profiler instance to useblockName
- The block identifierpublic static void recordExit(Profiler profiler, java.lang.String blockName, long duration)
profiler
- The Profiler instance to useblockName
- The block identifierduration
- The time spent in the mentioned blockpublic static Profiler.Snapshot snapshot(Profiler profiler)
profiler
- The Profiler instance to use
public static Profiler.Snapshot snapshotAndReset(Profiler profiler)
public static void reset(Profiler profiler)
public static void printSnapshot(java.lang.String name, Profiler profiler)
public static void printSnapshot(java.lang.String name, Profiler profiler, java.lang.String format)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |