Class PassiveProfiler

java.lang.Object
redempt.redlib.dev.profiler.Profiler
redempt.redlib.dev.profiler.PassiveProfiler

public class PassiveProfiler extends Profiler
A profiler best used over long periods of time. Uses very little memory even when running for very long periods, but cannot retrieve data from specific timeframes - only allows summaries of the entire time that was profiled.
  • Constructor Details

    • PassiveProfiler

      public PassiveProfiler()
      Create a new PassiveProfiler with an empty summary
  • Method Details

    • start

      public void start()
      Start this profiler. Must be run from the thread you intend to profile.
      Specified by:
      start in class Profiler
    • end

      protected void end()
      Specified by:
      end in class Profiler
    • getSummary

      public SampleSummary getSummary()
      Specified by:
      getSummary in class Profiler
      Returns:
      A summary of all of the data collected by this profiler, up to the time this method was called. The returned summary will not be updated with new data after it is returned.
    • getRunningSummary

      public SampleSummary getRunningSummary()
      Returns:
      A summary of all the data collected by this profiler. The returned summary will be updated with new data after it is returned if the profiler is still running.