|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.slf4j.profiler.Profiler
public class Profiler
A poor man's profiler to measure the time elapsed performing some lengthy task.
Constructor Summary | |
---|---|
Profiler(String name)
|
Method Summary | |
---|---|
long |
elapsedTime()
Time elapsed between start and stop, in nanoseconds. |
Logger |
getLogger()
|
String |
getName()
All time instruments are named entities. |
ProfilerRegistry |
getProfilerRegistry()
|
org.slf4j.profiler.TimeInstrumentStatus |
getStatus()
|
void |
log()
If the time instrument has an associated logger, then log information about this time instrument. |
void |
print()
Print information about this time instrument on the console. |
void |
registerWith(ProfilerRegistry profilerRegistry)
|
void |
setLogger(Logger logger)
|
void |
start(String name)
Starts a child stop watch and stops any previously started time instruments. |
Profiler |
startNested(String name)
|
TimeInstrument |
stop()
Stop this time instrument. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Profiler(String name)
Method Detail |
---|
public String getName()
TimeInstrument
getName
in interface TimeInstrument
public ProfilerRegistry getProfilerRegistry()
public void registerWith(ProfilerRegistry profilerRegistry)
public Logger getLogger()
public void setLogger(Logger logger)
public void start(String name)
start
in interface TimeInstrument
public Profiler startNested(String name)
public long elapsedTime()
TimeInstrument
elapsedTime
in interface TimeInstrument
public TimeInstrument stop()
TimeInstrument
stop
in interface TimeInstrument
public org.slf4j.profiler.TimeInstrumentStatus getStatus()
getStatus
in interface TimeInstrument
public void print()
TimeInstrument
print
in interface TimeInstrument
public String toString()
toString
in class Object
public void log()
TimeInstrument
StopWatch
instances cannot log while Profiler
instances can.
log
in interface TimeInstrument
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |