public class Profiler extends Object implements TimeInstrument
| Modifier and Type | Method and Description | 
|---|---|
long | 
elapsedTime()
Time elapsed between start and stop, in nanoseconds. 
 | 
List<TimeInstrument> | 
getCopyOfChildTimeInstruments()
Return a copy of the child instrument list for this Profiler instance. 
 | 
StopWatch | 
getCopyOfGlobalStopWatch()
Return a copy of the global stopwatch of this Profiler instance. 
 | 
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()  | 
public Profiler(String name)
public String getName()
TimeInstrumentgetName in interface TimeInstrumentpublic ProfilerRegistry getProfilerRegistry()
public void registerWith(ProfilerRegistry profilerRegistry)
public Logger getLogger()
public void setLogger(Logger logger)
public void start(String name)
start in interface TimeInstrumentpublic long elapsedTime()
TimeInstrumentelapsedTime in interface TimeInstrumentpublic TimeInstrument stop()
TimeInstrumentstop in interface TimeInstrumentpublic org.slf4j.profiler.TimeInstrumentStatus getStatus()
getStatus in interface TimeInstrumentpublic void print()
TimeInstrumentprint in interface TimeInstrumentpublic void log()
TimeInstrumentStopWatch instances cannot log while Profiler
 instances can.log in interface TimeInstrumentpublic List<TimeInstrument> getCopyOfChildTimeInstruments()
public StopWatch getCopyOfGlobalStopWatch()
Copyright © 2005–2019 QOS.ch. All rights reserved.