Class StackProfilerStrategy
java.lang.Object
com.atlassian.util.profiling.strategy.impl.StackProfilerStrategy
- All Implemented Interfaces:
ProfilerStrategy
Default profiling strategy, which is included into
Timers by default.- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.slf4j.LoggervoidMethod that is called to signal that the request has completed.voidsetConfiguration(ProfilerConfiguration configuration) Method that is called when the strategy isregistered.voidsetLogger(org.slf4j.Logger logger) Called to mark the end of a profiled block of code.
-
Constructor Details
-
StackProfilerStrategy
public StackProfilerStrategy()
-
-
Method Details
-
getLogger
public org.slf4j.Logger getLogger() -
onRequestEnd
public void onRequestEnd()Description copied from interface:ProfilerStrategyMethod that is called to signal that the request has completed. Implementations of this method should clean up any request or thread scoped resources associated with profiling state, includingclosinganytickersthat have not yet been closed.- Specified by:
onRequestEndin interfaceProfilerStrategy
-
setConfiguration
Description copied from interface:ProfilerStrategyMethod that is called when the strategy isregistered.- Specified by:
setConfigurationin interfaceProfilerStrategy- Parameters:
configuration- the configuration
-
setLogger
public void setLogger(org.slf4j.Logger logger) -
start
Description copied from interface:ProfilerStrategyCalled to mark the end of a profiled block of code.- Specified by:
startin interfaceProfilerStrategy- Parameters:
name- name describing the profiled block of code- Returns:
- a
tickerthat can be used tomarkthe end of the profiled code block. Must be non-null, but can beTicker.NO_OPif the strategy opts out of profiling.
-