Package org.slf4j.profiler
Class Profiler
java.lang.Object
org.slf4j.profiler.Profiler
- All Implemented Interfaces:
- TimeInstrument
A poor man's profiler to measure the time elapsed performing some lengthy
 task.
- Author:
- Ceki Gülcü
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongTime elapsed between start and stop, in nanoseconds.Return a copy of the child instrument list for this Profiler instance.Return a copy of the global stopwatch of this Profiler instance.getName()All time instruments are named entities.org.slf4j.profiler.TimeInstrumentStatusvoidlog()If the time instrument has an associated logger, then log information about this time instrument.voidprint()Print information about this time instrument on the console.voidregisterWith(ProfilerRegistry profilerRegistry) voidvoidStarts a child stop watch and stops any previously started time instruments.startNested(String name) stop()Stop this time instrument.toString()
- 
Constructor Details- 
Profiler
 
- 
- 
Method Details- 
getNameDescription copied from interface:TimeInstrumentAll time instruments are named entities.- Specified by:
- getNamein interface- TimeInstrument
- Returns:
- the name of this instrument
 
- 
getProfilerRegistry
- 
registerWith
- 
getLogger
- 
setLogger
- 
startStarts a child stop watch and stops any previously started time instruments.- Specified by:
- startin interface- TimeInstrument
- Parameters:
- name- the name of this instrument
 
- 
startNested
- 
elapsedTimeDescription copied from interface:TimeInstrumentTime elapsed between start and stop, in nanoseconds.- Specified by:
- elapsedTimein interface- TimeInstrument
- Returns:
- time elapsed in nanoseconds
 
- 
stopDescription copied from interface:TimeInstrumentStop this time instrument.- Specified by:
- stopin interface- TimeInstrument
- Returns:
- this
 
- 
getStatus- Specified by:
- getStatusin interface- TimeInstrument
 
- 
printDescription copied from interface:TimeInstrumentPrint information about this time instrument on the console.- Specified by:
- printin interface- TimeInstrument
 
- 
toString
- 
logDescription copied from interface:TimeInstrumentIf the time instrument has an associated logger, then log information about this time instrument. Note thatStopWatchinstances cannot log whileProfilerinstances can.- Specified by:
- login interface- TimeInstrument
 
- 
getCopyOfChildTimeInstrumentsReturn a copy of the child instrument list for this Profiler instance.- Returns:
- a copy of this instance's child time instrument list
- Since:
- 1.5.9
 
- 
getCopyOfGlobalStopWatchReturn a copy of the global stopwatch of this Profiler instance.- Returns:
- a copy of this instance's global stop watch
- Since:
- 1.5.9
 
 
-