Class GCProfiler

java.lang.Object
org.openjdk.jmh.profile.GCProfiler
All Implemented Interfaces:
InternalProfiler, Profiler

public class GCProfiler extends Object implements InternalProfiler
  • Field Details

    • beforeTime

      private long beforeTime
    • beforeGCCount

      private long beforeGCCount
    • beforeGCTime

      private long beforeGCTime
    • beforeAllocated

      private GCProfiler.HotspotAllocationSnapshot beforeAllocated
  • Constructor Details

    • GCProfiler

      public GCProfiler()
  • Method Details

    • getDescription

      public String getDescription()
      Description copied from interface: Profiler
      Human-readable one-line description of the profiler.
      Specified by:
      getDescription in interface Profiler
      Returns:
      description
    • beforeIteration

      public void beforeIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams)
      Description copied from interface: InternalProfiler
      Run this code before starting the next benchmark iteration.
      Specified by:
      beforeIteration in interface InternalProfiler
      Parameters:
      benchmarkParams - benchmark parameters used for current launch
      iterationParams - iteration parameters used for current launch
    • afterIteration

      public Collection<? extends Result> afterIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams, IterationResult iResult)
      Description copied from interface: InternalProfiler
      Run this code after a benchmark iteration finished
      Specified by:
      afterIteration in interface InternalProfiler
      Parameters:
      benchmarkParams - benchmark parameters used for current launch
      iterationParams - iteration parameters used for current launch
      iResult - iteration result
      Returns:
      profiler results