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

Commit 81a5cea6 authored by Vova Sharaienko's avatar Vova Sharaienko Committed by Automerger Merge Worker
Browse files

Merge "[TeX] Introduced Telemetry Express Logging APIs" am: a662169c am: 24956e37

parents 7cd50023 24956e37
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -71,5 +71,10 @@ void Histogram::logSample(float sample) const {
    stats_write(EXPRESS_HISTOGRAM_SAMPLE_REPORTED, mMetricIdHash, /*count*/ 1, binIndex);
    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 expresslog
}  // namespace android
}  // namespace android
+5 −0
Original line number Original line Diff line number Diff line
@@ -72,6 +72,11 @@ public:
     */
     */
    void logSample(float sample) const;
    void logSample(float sample) const;


    /**
     * Logs increment sample count for automatically calculated bin with uid
     */
    void logSampleWithUid(int32_t uid, float sample) const;

private:
private:
    const int64_t mMetricIdHash;
    const int64_t mMetricIdHash;
    const std::shared_ptr<BinOptions> mBinOptions;
    const std::shared_ptr<BinOptions> mBinOptions;