public final class Profiler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
Profiler.Section
Profiler section.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
FINE
Flag to indicate a fine section.
|
static int |
ROOT
Flag to indicate a root section.
|
| Constructor and Description |
|---|
Profiler() |
| Modifier and Type | Method and Description |
|---|---|
Profiler.Section |
begin(int flags,
java.lang.String... path)
Begin a new profiler section using the specified path and flags
|
Profiler.Section |
begin(int flags,
java.lang.String name)
Begin a new profiler section using the specified name and flags
|
Profiler.Section |
begin(java.lang.String... path)
Begin a new profiler section using the specified path
|
Profiler.Section |
begin(java.lang.String name)
Begin a new profiler section using the specified name
|
Profiler.Section |
get(java.lang.String name)
Get the specified profiler section
|
java.util.Collection<Profiler.Section> |
getSections()
Get all recorded profiler sections
|
void |
mark(java.lang.String phase)
Mark a new phase (time slice) for this profiler, all sections record
their current times and then reset to zero.
|
PrettyPrinter |
printer(boolean includeFine,
boolean group)
Get the profiler state with all sections in a
PrettyPrinter. |
void |
printSummary()
Print summary of mixin performance to the console
|
void |
reset()
Reset all profiler state
|
void |
setActive(boolean active)
Set the active state of the profiler.
|
public static final int ROOT
public static final int FINE
public void setActive(boolean active)
active - new active statepublic void reset()
public Profiler.Section get(java.lang.String name)
name - section namepublic Profiler.Section begin(java.lang.String... path)
path - path partspublic Profiler.Section begin(int flags, java.lang.String... path)
flags - section flagspath - path partspublic Profiler.Section begin(java.lang.String name)
name - section namepublic Profiler.Section begin(int flags, java.lang.String name)
flags - section flagsname - section namepublic void mark(java.lang.String phase)
phase - Name of the phasepublic java.util.Collection<Profiler.Section> getSections()
public PrettyPrinter printer(boolean includeFine, boolean group)
PrettyPrinter.includeFine - Include sections marked as FINEgroup - Group delegated sections with their root instead of in the
normal alphabetical orderpublic void printSummary()