use of io.flutter.perf.HeapMonitor.IsolateObject in project flutter-intellij by flutter.
the class HeapState method handleIsolatesInfo.
@Override
public void handleIsolatesInfo(VM vm, List<IsolateObject> isolates) {
int current = 0;
int total = 0;
isolateHeaps.clear();
for (IsolateObject isolate : isolates) {
isolateHeaps.put(isolate.getId(), isolate.getHeaps());
for (HeapSpace heap : isolate.getHeaps()) {
current += heap.getUsed() + heap.getExternal();
total += heap.getCapacity() + heap.getExternal();
}
}
rssBytes = vm.getJson().get("_currentRSS").getAsInt();
heapMaxInBytes = total;
addSample(new HeapSample(current, false));
}
Aggregations