// 
// Decompiled by Procyon v0.6.0
// 

package io.sentry;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.ApiStatus;

@ApiStatus.Internal
public final class JavaMemoryCollector implements IPerformanceSnapshotCollector
{
    @NotNull
    private final Runtime runtime;
    
    public JavaMemoryCollector() {
        this.runtime = Runtime.getRuntime();
    }
    
    @Override
    public void setup() {
    }
    
    @Override
    public void collect(@NotNull final PerformanceCollectionData performanceCollectionData) {
        final long usedMemory = this.runtime.totalMemory() - this.runtime.freeMemory();
        performanceCollectionData.setUsedHeapMemory(usedMemory);
    }
}
