Merge "[TeX] Introduced Telemetry Express Logging APIs" am: 0ffaad7007
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2494985 Change-Id: I4b203b01c567a4e65b93c5d3236a827dfe516ff4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
fc80781aa2
2 changed files with 7 additions and 0 deletions
|
|
@ -28,5 +28,10 @@ void Counter::logIncrement(const char* metricName, int64_t amount) {
|
|||
stats_write(EXPRESS_EVENT_REPORTED, metricIdHash, amount);
|
||||
}
|
||||
|
||||
void Counter::logIncrementWithUid(const char* metricName, int32_t uid, int64_t amount) {
|
||||
const int64_t metricIdHash = farmhash::Fingerprint64(metricName, strlen(metricName));
|
||||
stats_write(EXPRESS_UID_EVENT_REPORTED, metricIdHash, amount, uid);
|
||||
}
|
||||
|
||||
} // namespace expresslog
|
||||
} // namespace android
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ namespace expresslog {
|
|||
class Counter final {
|
||||
public:
|
||||
static void logIncrement(const char* metricId, int64_t amount = 1);
|
||||
|
||||
static void logIncrementWithUid(const char* metricId, int32_t uid, int64_t amount = 1);
|
||||
};
|
||||
|
||||
} // namespace expresslog
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue