Search in sources :

Example 1 with IsolateObject

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));
}
Also used : HeapSample(io.flutter.perf.HeapMonitor.HeapSample) IsolateObject(io.flutter.perf.HeapMonitor.IsolateObject) HeapSpace(io.flutter.perf.HeapMonitor.HeapSpace)

Aggregations

HeapSample (io.flutter.perf.HeapMonitor.HeapSample)1 HeapSpace (io.flutter.perf.HeapMonitor.HeapSpace)1 IsolateObject (io.flutter.perf.HeapMonitor.IsolateObject)1