diff options
| author | 2023-03-28 22:05:28 +0000 | |
|---|---|---|
| committer | 2023-03-28 22:05:28 +0000 | |
| commit | e6f44ac081fa8d8dfcccc2748cb1330de655f08f (patch) | |
| tree | 8b43c697374e9054d6ac6751490f31595c76a2b1 | |
| parent | 2fef8f6e9da7faf1ed9aa704f5cc6ae40172950b (diff) | |
| parent | 799477d8b8387ff3f23b683b708b6dfe33c1811f (diff) | |
Merge "[TeX] Introduced Telemetry Express Logging APIs"
| -rw-r--r-- | core/java/com/android/internal/expresslog/Histogram.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/com/android/internal/expresslog/Histogram.java b/core/java/com/android/internal/expresslog/Histogram.java index 65fbb03bf967..2fe784a5a855 100644 --- a/core/java/com/android/internal/expresslog/Histogram.java +++ b/core/java/com/android/internal/expresslog/Histogram.java @@ -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 { /** |