public abstract static class Profiler.Section
extends java.lang.Object
DisabledSection so as to consume minimal resources
without needing to introduce nullability checks everwhere that sections
are used. When enabled, LiveSection is used to record timings.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
invalidated
True if this section has been invalidated by a call to Profiler#clear
|
| Modifier and Type | Method and Description |
|---|---|
Profiler.Section |
end()
Stop timing of this section and end it (pop from profiler stack)
|
double |
getAverageTime()
Get the average time in milliseconds of each time period recorded in
the current slice
|
java.lang.String |
getBaseName()
Get the base name for this section, for delegated sections this is
the name of the parent section, minus the root
|
int |
getCount()
Get the number of total time periods recorded in the current slice
|
protected int |
getCursor() |
java.lang.String |
getInfo()
Get the auxilliary info for this section
|
protected int |
getMarkedCount()
Internal accessor for markedCount from LiveSection, used by
ResultSection
|
protected long |
getMarkedTime()
Internal accessor for markedTime from LiveSection, used by
ResultSection
|
java.lang.String |
getName()
Get the section name
|
double |
getSeconds()
Get the current time in seconds in the current phase
|
long |
getTime()
Get the current time in milliseconds in the current phase
|
long[] |
getTimes()
Get all available time slices including the current one in
milliseconds
|
double |
getTotalAverageTime()
Get the average time in milliseconds of each time period recorded in
the all slices
|
int |
getTotalCount()
Get the number of total time periods recorded in the all slices
|
double |
getTotalSeconds()
Get the current time in seconds in all phases
|
long |
getTotalTime()
Get the current time in milliseconds in all phases
|
boolean |
isFine()
Get whether this section is FINE
|
boolean |
isRoot()
Get whether this is a root section
|
Profiler.Section |
next(java.lang.String name)
Stop timing of this section and start a new section at the same level
|
void |
setInfo(java.lang.String info)
Set the auxilliary info for this section
|
protected Profiler.Section |
stop()
Stop timing of this section
|
java.lang.String |
toString() |
protected boolean invalidated
protected int getCursor()
public boolean isRoot()
public boolean isFine()
public java.lang.String getName()
public java.lang.String getBaseName()
public void setInfo(java.lang.String info)
info - aux infopublic java.lang.String getInfo()
protected Profiler.Section stop()
public Profiler.Section end()
public Profiler.Section next(java.lang.String name)
name - name of the next sectionpublic long getTime()
public long getTotalTime()
public double getSeconds()
public double getTotalSeconds()
public long[] getTimes()
public int getCount()
public int getTotalCount()
public double getAverageTime()
public double getTotalAverageTime()
public final java.lang.String toString()
toString in class java.lang.Objectprotected long getMarkedTime()
protected int getMarkedCount()