org.slf4j.profiler

Class Profiler

public class Profiler extends Object implements TimeInstrument

A poor man's profiler to measure the time elapsed performing some lengthy task.

Author: Ceki Gülcü

Constructor Summary
Profiler(String name)
Method Summary
longelapsedTime()
LoggergetLogger()
StringgetName()
ProfilerRegistrygetProfilerRegistry()
TimeInstrumentStatusgetStatus()
voidlog()
voidprint()
voidregisterWith(ProfilerRegistry profilerRegistry)
voidsetLogger(Logger logger)
voidstart(String name)
Starts a child stop watch and stops any previously started time instruments.
ProfilerstartNested(String name)
TimeInstrumentstop()

Constructor Detail

Profiler

public Profiler(String name)

Method Detail

elapsedTime

public long elapsedTime()

getLogger

public Logger getLogger()

getName

public String getName()

getProfilerRegistry

public ProfilerRegistry getProfilerRegistry()

getStatus

public TimeInstrumentStatus getStatus()

log

public void log()

print

public void print()

registerWith

public void registerWith(ProfilerRegistry profilerRegistry)

setLogger

public void setLogger(Logger logger)

start

public void start(String name)
Starts a child stop watch and stops any previously started time instruments.

startNested

public Profiler startNested(String name)

stop

public TimeInstrument stop()
Copyright © 2005-2009 QOS.ch. All Rights Reserved.