|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.Profiler
public class Profiler
Lightweight profiling tool that can be used to collect profiling data with
zero overhead unless enabled. To enable profiling, add
<set-property name="vaadin.profiler" value="true" /> to
your .gwt.xml file.
| Nested Class Summary | |
|---|---|
static class |
Profiler.EnabledProfiler
Class to include using deferred binding to enable the profiling. |
static class |
Profiler.Node
A hierarchical representation of the time spent running a named block of code. |
static interface |
Profiler.ProfilerResultConsumer
Interface for getting data from the Profiler. |
| Constructor Summary | |
|---|---|
Profiler()
|
|
| Method Summary | |
|---|---|
static void |
enter(java.lang.String name)
Enters a named block. |
static double |
getRelativeTimeMillis()
Returns time relative to the particular page load time. |
static void |
initialize()
Initializes the profiler. |
static boolean |
isEnabled()
Checks whether the profiling gathering is enabled. |
protected boolean |
isImplEnabled()
Overridden in Profiler.EnabledProfiler to make isEnabled() return
true if GWT.create returns that class. |
static void |
leave(java.lang.String name)
Leaves a named block. |
static void |
logBootstrapTimings()
Outputs the time passed since various events recored in performance.timing if supported by the browser. |
static void |
logTimings()
Outputs the gathered profiling data to the debug console. |
static void |
reset()
Resets the collected profiler data. |
static void |
setProfilerResultConsumer(Profiler.ProfilerResultConsumer profilerResultConsumer)
Sets the profiler result consumer that is used to output the profiler data to the user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Profiler()
| Method Detail |
|---|
public static boolean isEnabled()
true if the profiling is enabled, else
falsepublic static void enter(java.lang.String name)
leave(String) when leaving the block. Calls to this method will
be removed by the compiler unless profiling is enabled.
name - the name of the entered blockpublic static void leave(java.lang.String name)
enter(String) when entering the block. Calls to this method will
be removed by the compiler unless profiling is enabled.
name - the name of the left blockpublic static double getRelativeTimeMillis()
public static void reset()
public static void initialize()
Please note that this method should be called even if the profiler is not enabled because it will then remove a logger function that might have been included in the HTML page and that would leak memory unless removed.
public static void logTimings()
protected boolean isImplEnabled()
Profiler.EnabledProfiler to make isEnabled() return
true if GWT.create returns that class.
true if the profiling is enabled, else
falsepublic static void logBootstrapTimings()
public static void setProfilerResultConsumer(Profiler.ProfilerResultConsumer profilerResultConsumer)
Warning! This is internal API and should not be used by applications or add-ons.
profilerResultConsumer - the consumer that gets profiler data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||