package com.bytedance.bae.base;

import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;

public class Histogram {
    public final long handle;

    static {
        Covode.recordClassIndex(24194);
    }

    public static native void nativeAddSample(long j, int i);

    public static native long nativeCreateCounts(String str, int i, int i2, int i3);

    public static native long nativeCreateEnumeration(String str, int i);

    public Histogram(long j) {
        this.handle = j;
    }

    public void addSample(int i) {
        MethodCollector.i(15526);
        nativeAddSample(this.handle, i);
        MethodCollector.o(15526);
    }

    public static Histogram createEnumeration(String str, int i) {
        MethodCollector.i(15525);
        Histogram histogram = new Histogram(nativeCreateEnumeration(str, i));
        MethodCollector.o(15525);
        return histogram;
    }

    public static Histogram createCounts(String str, int i, int i2, int i3) {
        MethodCollector.i(15519);
        Histogram histogram = new Histogram(nativeCreateCounts(str, i, i2, i3));
        MethodCollector.o(15519);
        return histogram;
    }
}
