Interface ProfilerStrategy

All Known Implementing Classes:
StackProfilerStrategy

@Internal public interface ProfilerStrategy
Strategy for profiling code blocks, to be used with Timers.
Since:
3.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Method that is called to signal that the request has completed.
    void
    Method that is called when the strategy is registered.
    start(String frameName)
    Called to mark the end of a profiled block of code.
  • Method Details

    • onRequestEnd

      default void onRequestEnd()
      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.
    • setConfiguration

      void setConfiguration(@Nonnull ProfilerConfiguration configuration)
      Method that is called when the strategy is registered.
      Parameters:
      configuration - the configuration
    • start

      @Nonnull Ticker start(@Nonnull String frameName)
      Called to mark the end of a profiled block of code.
      Parameters:
      frameName - 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.