getAllocationProfile method

Future<AllocationProfile> getAllocationProfile(
  1. String isolateId, {
  2. bool? reset,
  3. bool? gc,
})

The getAllocationProfile RPC is used to retrieve allocation information for a given isolate.

If reset is provided and is set to true, the allocation accumulators will be reset before collecting allocation information.

If gc is provided and is set to true, a garbage collection will be attempted before collecting allocation information. There is no guarantee that a garbage collection will be actually be performed.

If isolateId refers to an isolate which has exited, then the Collected Sentinel is returned.

This method will throw a SentinelException in the case a Sentinel is returned.

Implementation

Future<AllocationProfile> getAllocationProfile(String isolateId,
        {bool? reset, bool? gc}) =>
    _call('getAllocationProfile', {
      'isolateId': isolateId,
      if (reset != null && reset) 'reset': reset,
      if (gc != null && gc) 'gc': gc,
    });