Class StackProfilerStrategy

java.lang.Object
com.atlassian.util.profiling.strategy.impl.StackProfilerStrategy
All Implemented Interfaces:
ProfilerStrategy

@Internal public class StackProfilerStrategy extends Object implements ProfilerStrategy
Default profiling strategy, which is included into Timers by default.
Since:
3.0
  • Constructor Details

    • StackProfilerStrategy

      public StackProfilerStrategy()
  • Method Details

    • getLogger

      public org.slf4j.Logger getLogger()
    • onRequestEnd

      public void onRequestEnd()
      Description copied from interface: ProfilerStrategy
      Method 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, including closing any tickers that have not yet been closed.
      Specified by:
      onRequestEnd in interface ProfilerStrategy
    • setConfiguration

      public void setConfiguration(@Nonnull ProfilerConfiguration configuration)
      Description copied from interface: ProfilerStrategy
      Method that is called when the strategy is registered.
      Specified by:
      setConfiguration in interface ProfilerStrategy
      Parameters:
      configuration - the configuration
    • setLogger

      public void setLogger(org.slf4j.Logger logger)
    • start

      @Nonnull public Ticker start(@Nonnull String name)
      Description copied from interface: ProfilerStrategy
      Called to mark the end of a profiled block of code.
      Specified by:
      start in interface ProfilerStrategy
      Parameters:
      name - name describing the profiled block of code
      Returns:
      a ticker that can be used to mark the end of the profiled code block. Must be non-null, but can be Ticker.NO_OP if the strategy opts out of profiling.