|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.jimr.gae.profiler.MiniProfiler
public class MiniProfiler
Simple step instrumentation that can be used to profile Java code in the
context of the MiniProfilerFilter.
To start a step, use the step(String) method. To finish a step, call
the close method on the MiniProfiler.Step object returned.
Typically you will do this in a try/finally block like:
Step s = MiniProfiler.step("My Step");
try
{
// Do Stuff
} finally
{
s.close();
}
Steps can be nested (e.g. starting a step while inside another step)
Profiling data is stored in a ThreadLocal.
| Nested Class Summary | |
|---|---|
protected static class |
MiniProfiler.Profile
Contains information about a profiling step |
static class |
MiniProfiler.Step
Used to control the starting and stopping of profiling steps. |
| Constructor Summary | |
|---|---|
MiniProfiler()
|
|
| Method Summary | |
|---|---|
protected static void |
start()
Start the profiler. |
static MiniProfiler.Step |
step(String stepName)
Start a profiling step. |
protected static MiniProfiler.Profile |
stop()
Stop the profiler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MiniProfiler()
| Method Detail |
|---|
protected static void start()
protected static MiniProfiler.Profile stop()
This should be called in a finally block to avoid leaving data on
the thread.
public static MiniProfiler.Step step(String stepName)
stepName - The name of the step.
Step object whose MiniProfiler.Step.close() method should be
called to finish the step.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||