Loading cmds/statsd/src/anomaly/AnomalyTracker.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <android/os/IIncidentManager.h> #include <android/os/IncidentReportArgs.h> #include <binder/IServiceManager.h> #include <statslog.h> #include <time.h> namespace android { Loading Loading @@ -224,6 +225,9 @@ void AnomalyTracker::declareAnomaly(const uint64_t& timestampNs) { } StatsdStats::getInstance().noteAnomalyDeclared(mConfigKey, mAlert.name()); android::util::stats_write(android::util::ANOMALY_DETECTED, mConfigKey.GetUid(), mConfigKey.GetName().c_str(), mAlert.name().c_str()); } void AnomalyTracker::declareAnomalyIfAlarmExpired(const HashableDimensionKey& dimensionKey, Loading cmds/statsd/src/atoms.proto +19 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ message Atom { IsolatedUidChanged isolated_uid_changed = 43; PacketWakeupOccurred packet_wakeup_occurred = 44; DropboxErrorChanged dropbox_error_changed = 45; AppHook app_hook = 46; AnomalyDetected anomaly_detected = 46; AppHook app_hook = 47; // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15. } Loading Loading @@ -840,6 +841,23 @@ message AppHook { optional State state = 3; } /** * Logs when statsd detects an anomaly. * * Logged from: * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp */ message AnomalyDetected { // Uid that owns the config whose anomaly detection alert fired. optional int32 config_uid = 1; // Name of the config whose anomaly detection alert fired. optional string config_name = 2; // Name of the alert (i.e. name of the anomaly that was detected). optional string alert_name = 3; } /** * Pulls bytes transferred via wifi (Sum of foreground and background usage). * Loading Loading
cmds/statsd/src/anomaly/AnomalyTracker.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <android/os/IIncidentManager.h> #include <android/os/IncidentReportArgs.h> #include <binder/IServiceManager.h> #include <statslog.h> #include <time.h> namespace android { Loading Loading @@ -224,6 +225,9 @@ void AnomalyTracker::declareAnomaly(const uint64_t& timestampNs) { } StatsdStats::getInstance().noteAnomalyDeclared(mConfigKey, mAlert.name()); android::util::stats_write(android::util::ANOMALY_DETECTED, mConfigKey.GetUid(), mConfigKey.GetName().c_str(), mAlert.name().c_str()); } void AnomalyTracker::declareAnomalyIfAlarmExpired(const HashableDimensionKey& dimensionKey, Loading
cmds/statsd/src/atoms.proto +19 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ message Atom { IsolatedUidChanged isolated_uid_changed = 43; PacketWakeupOccurred packet_wakeup_occurred = 44; DropboxErrorChanged dropbox_error_changed = 45; AppHook app_hook = 46; AnomalyDetected anomaly_detected = 46; AppHook app_hook = 47; // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15. } Loading Loading @@ -840,6 +841,23 @@ message AppHook { optional State state = 3; } /** * Logs when statsd detects an anomaly. * * Logged from: * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp */ message AnomalyDetected { // Uid that owns the config whose anomaly detection alert fired. optional int32 config_uid = 1; // Name of the config whose anomaly detection alert fired. optional string config_name = 2; // Name of the alert (i.e. name of the anomaly that was detected). optional string alert_name = 3; } /** * Pulls bytes transferred via wifi (Sum of foreground and background usage). * Loading