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

Commit 799477d8 authored by Vova Sharaienko's avatar Vova Sharaienko
Browse files

[TeX] Introduced Telemetry Express Logging APIs

- provided Java Histogram metric logging API with UID

Bug: 266586106
Test: m
Change-Id: Icb5cbbc0f0937090c85255eb7a10f8f9ee4bbc9c
parent 89e6a198
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -54,6 +54,19 @@ public final class Histogram {
                /*count*/ 1, binIndex);
    }

    /**
     * Logs increment sample count for automatically calculated bin
     *
     * @param uid used as a dimension for the count metric
     * @param sample value
     * @hide
     */
    public void logSampleWithUid(int uid, float sample) {
        final int binIndex = mBinOptions.getBinForSample(sample);
        FrameworkStatsLog.write(FrameworkStatsLog.EXPRESS_UID_HISTOGRAM_SAMPLE_REPORTED,
                mMetricIdHash, /*count*/ 1, binIndex, uid);
    }

    /** Used by Histogram to map data sample to corresponding bin */
    public interface BinOptions {
        /**