Class AllocationInstrument


  • @SupportsVmType(JVM)
    public final class AllocationInstrument
    extends Instrument
    Instrument that watches the memory allocations in an invocation of the benchmark method and reports some statistic. The benchmark method must accept a single int argument 'reps', which is the number of times to execute the guts of the benchmark method, and it must be public and non-static.

    Note that the allocation instruments reports a "worst case" for allocation in that it reports the bytes and objects allocated in interpreted mode (no JIT).