Merge "[TeX] Introduced Telemetry Express Logging APIs" am: e6f44ac081 am: 5a72ad406a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2506824

Change-Id: Idf06fee3720b98abd3e01e2998bf85b62482e99c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vova Sharaienko
2023-03-28 22:58:52 +00:00
committed by Automerger Merge Worker

View File

@@ -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 {
/**