Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c2ff8b8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[TeX] Added public APIs documentation"

parents 3cac9278 4211c6a1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ public final class Counter {

    /**
     * Increments Telemetry Express Counter metric by 1
     * @param metricId to log, no-op if metricId is not defined in the TeX catalog
     * @hide
     */
    public static void logIncrement(@NonNull String metricId) {
@@ -36,6 +37,8 @@ public final class Counter {

    /**
     * Increments Telemetry Express Counter metric by arbitrary value
     * @param metricId to log, no-op if metricId is not defined in the TeX catalog
     * @param amount to increment counter
     * @hide
     */
    public static void logIncrement(@NonNull String metricId, long amount) {
+20 −4
Original line number Diff line number Diff line
@@ -26,6 +26,12 @@ public final class Histogram {
    private final long mMetricIdHash;
    private final BinOptions mBinOptions;

    /**
     * Creates Histogram metric logging wrapper
     * @param metricId to log, logging will be no-op if metricId is not defined in the TeX catalog
     * @param binOptions to calculate bin index for samples
     * @hide
     */
    public Histogram(@NonNull String metricId, @NonNull BinOptions binOptions) {
        mMetricIdHash = Utils.hashString(metricId);
        mBinOptions = binOptions;
@@ -33,7 +39,7 @@ public final class Histogram {

    /**
     * Logs increment sample count for automatically calculated bin
     *
     * @param sample value
     * @hide
     */
    public void logSample(float sample) {
@@ -46,17 +52,16 @@ public final class Histogram {
    public interface BinOptions {
        /**
         * Returns bins count to be used by a histogram
         *
         * @return bins count used to initialize Options, including overflow & underflow bins
         * @hide
         */
        int getBinsCount();

        /**
         * @return zero based index
         * Calculates bin index for the input sample value
         * Returns bin index for the input sample value
         * index == 0 stands for underflow
         * index == getBinsCount() - 1 stands for overflow
         * @return zero based index
         * @hide
         */
        int getBinForSample(float sample);
@@ -70,6 +75,17 @@ public final class Histogram {
        private final float mExclusiveMaxValue;
        private final float mBinSize;

        /**
         * Creates otpions for uniform (linear) sized bins
         * @param binCount amount of histogram bins. 2 bin indexes will be calculated
         *                 automatically to represent undeflow & overflow bins
         * @param minValue is included in the first bin, values less than minValue
         *                 go to underflow bin
         * @param exclusiveMaxValue is included in the overflow bucket. For accurate
                                    measure up to kMax, then exclusiveMaxValue
         *                          should be set to kMax + 1
         * @hide
         */
        public UniformOptions(int binCount, float minValue, float exclusiveMaxValue) {
            if (binCount < 1) {
                throw new IllegalArgumentException("Bin count should be positive number");