Merge "[TeX] Introduced Telemetry Express Logging APIs"
This commit is contained in:
commit
a662169c44
2 changed files with 10 additions and 0 deletions
|
@ -71,5 +71,10 @@ void Histogram::logSample(float sample) const {
|
|||
stats_write(EXPRESS_HISTOGRAM_SAMPLE_REPORTED, mMetricIdHash, /*count*/ 1, binIndex);
|
||||
}
|
||||
|
||||
void Histogram::logSampleWithUid(int32_t uid, float sample) const {
|
||||
const int binIndex = mBinOptions->getBinForSample(sample);
|
||||
stats_write(EXPRESS_UID_HISTOGRAM_SAMPLE_REPORTED, mMetricIdHash, /*count*/ 1, binIndex, uid);
|
||||
}
|
||||
|
||||
} // namespace expresslog
|
||||
} // namespace android
|
||||
|
|
|
@ -72,6 +72,11 @@ public:
|
|||
*/
|
||||
void logSample(float sample) const;
|
||||
|
||||
/**
|
||||
* Logs increment sample count for automatically calculated bin with uid
|
||||
*/
|
||||
void logSampleWithUid(int32_t uid, float sample) const;
|
||||
|
||||
private:
|
||||
const int64_t mMetricIdHash;
|
||||
const std::shared_ptr<BinOptions> mBinOptions;
|
||||
|
|
Loading…
Reference in a new issue