usedBytes method
Used heap bytes of the test isolate after a forced GC, or null.
Implementation
Future<int?> usedBytes() async {
try {
final profile = await _service.getAllocationProfile(
_isolateId,
gc: true,
);
return profile.memoryUsage?.heapUsage;
} catch (_) {
return null;
}
}