/frameworks/base/cmds/statsd/src/config/ |
D | ConfigKey.h | 33 class ConfigKey { 35 ConfigKey(); 36 ConfigKey(const ConfigKey& that); 37 ConfigKey(int uid, const int64_t& id); 38 ~ConfigKey(); 47 inline bool operator<(const ConfigKey& that) const { 57 inline bool operator==(const ConfigKey& that) const { 80 using android::os::statsd::ConfigKey; 83 struct hash<ConfigKey> { 84 std::size_t operator()(const ConfigKey& key) const {
|
D | ConfigKey.cpp | 23 ConfigKey::ConfigKey() { in ConfigKey() function in android::os::statsd::ConfigKey 26 ConfigKey::ConfigKey(const ConfigKey& that) : mId(that.mId), mUid(that.mUid) { in ConfigKey() function in android::os::statsd::ConfigKey 29 ConfigKey::ConfigKey(int uid, const int64_t& id) : mId(id), mUid(uid) { in ConfigKey() function in android::os::statsd::ConfigKey 32 ConfigKey::~ConfigKey() { in ~ConfigKey() 35 string ConfigKey::ToString() const { in ToString()
|
D | ConfigManager.h | 61 void UpdateConfig(const ConfigKey& key, const StatsdConfig& data); 66 void SetConfigReceiver(const ConfigKey& key, const sp<IBinder>& intentSender); 71 const sp<android::IBinder> GetConfigReceiver(const ConfigKey& key) const; 76 std::vector<ConfigKey> GetAllConfigKeys() const; 81 void RemoveConfigReceiver(const ConfigKey& key); 105 void RemoveConfig(const ConfigKey& key); 128 void update_saved_configs_locked(const ConfigKey& key, 135 void remove_saved_configs(const ConfigKey& key); 140 std::map<int, std::set<ConfigKey>> mConfigs; 146 std::map<ConfigKey, sp<android::IBinder>> mConfigReceivers;
|
D | ConfigManager.cpp | 52 map<ConfigKey, StatsdConfig> configsFromDisk; in Startup() 68 void ConfigManager::UpdateConfig(const ConfigKey& key, const StatsdConfig& config) { in UpdateConfig() 117 void ConfigManager::SetConfigReceiver(const ConfigKey& key, const sp<IBinder>& intentSender) { in SetConfigReceiver() 122 void ConfigManager::RemoveConfigReceiver(const ConfigKey& key) { in RemoveConfigReceiver() 138 void ConfigManager::RemoveConfig(const ConfigKey& key) { in RemoveConfig() 178 void ConfigManager::remove_saved_configs(const ConfigKey& key) { in remove_saved_configs() 184 vector<ConfigKey> removed; in RemoveConfigs() 223 vector<ConfigKey> removed; in RemoveAllConfigs() 253 vector<ConfigKey> ConfigManager::GetAllConfigKeys() const { in GetAllConfigKeys() 256 vector<ConfigKey> ret; in GetAllConfigKeys() [all …]
|
D | ConfigListener.h | 41 virtual void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, 47 virtual void OnConfigRemoved(const ConfigKey& key) = 0;
|
/frameworks/base/cmds/statsd/tests/ |
D | ConfigManager_test.cpp | 47 MOCK_METHOD3(OnConfigUpdated, void(const int64_t timestampNs, const ConfigKey& key, 49 MOCK_METHOD1(OnConfigRemoved, void(const ConfigKey& key)); 95 manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config91); in TEST() 101 manager->UpdateConfig(ConfigKey(1, StringToId("zzz")), config92); in TEST() 107 manager->UpdateConfig(ConfigKey(1, StringToId("yyy")), config93); in TEST() 113 manager->UpdateConfig(ConfigKey(2, StringToId("zzz")), config94); in TEST() 118 manager->RemoveConfig(ConfigKey(1, StringToId("yyy"))); in TEST() 123 manager->RemoveConfig(ConfigKey(2, StringToId("zzz"))); in TEST() 128 manager->RemoveConfig(ConfigKey(1, StringToId("zzz"))); in TEST() 131 manager->RemoveConfig(ConfigKey(2, StringToId("zzz"))); in TEST() [all …]
|
D | UidMap_test.cpp | 49 [](const ConfigKey& key) { return true; }, in TEST() 198 ConfigKey config1(1, StringToId("config1")); in TEST() 228 ConfigKey config1(1, StringToId("config1")); in TEST() 256 ConfigKey config1(1, StringToId("config1")); in TEST() 296 ConfigKey config1(1, StringToId("config1")); in TEST() 297 ConfigKey config2(1, StringToId("config2")); in TEST() 365 ConfigKey config1(1, StringToId("config1")); in TEST() 396 ConfigKey config1(1, StringToId("config1")); in TEST()
|
D | StatsLogProcessor_test.cpp | 50 : MetricsManager(ConfigKey(1, 12345), StatsdConfig(), 1000, 1000, new UidMap(), in MockMetricsManager() 70 [](const ConfigKey& key) { return true; }, in TEST() 75 ConfigKey key(100, 12345); in TEST() 91 [&broadcastCount](const ConfigKey& key) { in TEST() 99 ConfigKey key(100, 12345); in TEST() 123 [&broadcastCount](const ConfigKey& key) { in TEST() 131 ConfigKey key(100, 12345); in TEST() 168 [&broadcastCount](const ConfigKey& key) { in TEST() 173 ConfigKey key(3, 4); in TEST() 199 [&broadcastCount](const ConfigKey& key) { in TEST() [all …]
|
/frameworks/base/cmds/statsd/src/ |
D | StatsLogProcessor.h | 41 const std::function<bool(const ConfigKey&)>& sendBroadcast, 48 void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, 50 void OnConfigRemoved(const ConfigKey& key); 52 size_t GetMetricsSize(const ConfigKey& key) const; 56 void onDumpReport(const ConfigKey& key, const int64_t dumpTimeNs, 61 void onDumpReport(const ConfigKey& key, const int64_t dumpTimeNs, 115 int64_t getLastReportTimeNs(const ConfigKey& key); 125 void noteOnDiskData(const ConfigKey& key); 139 std::unordered_map<ConfigKey, sp<MetricsManager>> mMetricsManagers; 141 std::unordered_map<ConfigKey, int64_t> mLastBroadcastTimes; [all …]
|
D | StatsLogProcessor.cpp | 82 const std::function<bool(const ConfigKey&)>& sendBroadcast, in StatsLogProcessor() 189 std::vector<ConfigKey> configKeys; in resetConfigsLocked() 303 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, in OnConfigUpdated() 311 const int64_t timestampNs, const ConfigKey& key, const StatsdConfig& config) { in OnConfigUpdatedLocked() 327 size_t StatsLogProcessor::GetMetricsSize(const ConfigKey& key) const { in GetMetricsSize() 354 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs, in onDumpReport() 400 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs, in onDumpReport() 422 const ConfigKey& key, const int64_t dumpTimeStampNs, in onConfigMetricsReportLocked() 481 const std::vector<ConfigKey>& configs) { in resetConfigsLocked() 498 std::vector<ConfigKey> configKeysTtlExpired; in resetIfConfigTtlExpiredLocked() [all …]
|
D | StatsService.cpp | 166 [this](const ConfigKey& key) { in __anon24fc2e590502() 333 for (const ConfigKey& configKey : mConfigManager->GetAllConfigKeys()) { in dumpIncidentSection() 570 ConfigKey key(uid, StrToInt64(name)); in cmd_trigger_broadcast() 692 mConfigManager->UpdateConfig(ConfigKey(uid, configID), config); in cmd_config() 698 mConfigManager->RemoveConfig(ConfigKey(uid, StrToInt64(name))); in cmd_config() 745 mProcessor->onDumpReport(ConfigKey(uid, StrToInt64(name)), getElapsedRealtimeNs(), in cmd_dump_report() 784 vector<ConfigKey> configs = mConfigManager->GetAllConfigKeys(); in cmd_print_stats() 785 for (const ConfigKey& key : configs) { in cmd_print_stats() 1138 ConfigKey configKey(ipc->getCallingUid(), key); in getData() 1171 ConfigKey configKey(uid, key); in addConfigurationChecked() [all …]
|
/frameworks/base/cmds/statsd/src/guardrail/ |
D | StatsdStats.h | 190 void noteConfigReceived(const ConfigKey& key, int metricsCount, int conditionsCount, 197 void noteConfigRemoved(const ConfigKey& key); 201 void noteConfigReset(const ConfigKey& key); 206 void noteBroadcastSent(const ConfigKey& key); 213 void noteActiveStatusChanged(const ConfigKey& key, bool activate); 218 void noteDataDropped(const ConfigKey& key, const size_t totalBytes); 225 void noteMetricsReportSent(const ConfigKey& key, const size_t num_bytes); 237 void noteConditionDimensionSize(const ConfigKey& key, const int64_t& id, int size); 249 void noteMetricDimensionSize(const ConfigKey& key, const int64_t& id, int size); 261 void noteMetricDimensionInConditionSize(const ConfigKey& key, const int64_t& id, int size); [all …]
|
D | StatsdStats.cpp | 140 const ConfigKey& key, int metricsCount, int conditionsCount, int matchersCount, in noteConfigReceived() 170 void StatsdStats::noteConfigRemovedInternalLocked(const ConfigKey& key) { in noteConfigRemovedInternalLocked() 180 void StatsdStats::noteConfigRemoved(const ConfigKey& key) { in noteConfigRemoved() 185 void StatsdStats::noteConfigResetInternalLocked(const ConfigKey& key) { in noteConfigResetInternalLocked() 192 void StatsdStats::noteConfigReset(const ConfigKey& key) { in noteConfigReset() 206 void StatsdStats::noteBroadcastSent(const ConfigKey& key) { in noteBroadcastSent() 210 void StatsdStats::noteBroadcastSent(const ConfigKey& key, int32_t timeSec) { in noteBroadcastSent() 223 void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated) { in noteActiveStatusChanged() 227 void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated, int32_t timeSec) { in noteActiveStatusChanged() 255 void StatsdStats::noteDataDropped(const ConfigKey& key, const size_t totalBytes) { in noteDataDropped() [all …]
|
/frameworks/base/cmds/statsd/src/storage/ |
D | StorageManager.h | 87 const std::function<void(const ConfigKey&)>& sendBroadcast); 92 static bool hasConfigMetricsReport(const ConfigKey& key); 108 static void appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto, 114 static void readConfigFromDisk(std::map<ConfigKey, StatsdConfig>& configsMap); 120 static bool readConfigFromDisk(const ConfigKey& key, StatsdConfig* config); 121 static bool readConfigFromDisk(const ConfigKey& key, string* config); 132 static bool hasIdenticalConfig(const ConfigKey& key,
|
D | StorageManager.cpp | 359 const std::function<void(const ConfigKey&)>& sendBroadcast) { in sendBroadcast() 375 sendBroadcast(ConfigKey((int)output.mUid, output.mConfigId)); in sendBroadcast() 379 bool StorageManager::hasConfigMetricsReport(const ConfigKey& key) { in hasConfigMetricsReport() 407 void StorageManager::appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto, in appendConfigMetricsReport() 469 void StorageManager::readConfigFromDisk(map<ConfigKey, StatsdConfig>& configsMap) { in readConfigFromDisk() argument 492 configsMap[ConfigKey(output.mUid, output.mConfigId)] = config; in readConfigFromDisk() 502 bool StorageManager::readConfigFromDisk(const ConfigKey& key, StatsdConfig* config) { in readConfigFromDisk() 508 bool StorageManager::readConfigFromDisk(const ConfigKey& key, string* content) { in readConfigFromDisk() 541 bool StorageManager::hasIdenticalConfig(const ConfigKey& key, in hasIdenticalConfig()
|
/frameworks/base/cmds/statsd/src/subscriber/ |
D | SubscriberReporter.h | 64 void setBroadcastSubscriber(const ConfigKey& configKey, 71 void unsetBroadcastSubscriber(const ConfigKey& configKey, int64_t subscriberId); 74 void removeConfig(const ConfigKey& configKey); 81 void alertBroadcastSubscriber(const ConfigKey& configKey, 96 std::unordered_map<ConfigKey, 104 const ConfigKey& configKey,
|
D | SubscriberReporter.cpp | 31 void SubscriberReporter::setBroadcastSubscriber(const ConfigKey& configKey, in setBroadcastSubscriber() 39 void SubscriberReporter::unsetBroadcastSubscriber(const ConfigKey& configKey, in unsetBroadcastSubscriber() 52 void SubscriberReporter::removeConfig(const ConfigKey& configKey) { in removeConfig() 58 void SubscriberReporter::alertBroadcastSubscriber(const ConfigKey& configKey, in alertBroadcastSubscriber() 100 const ConfigKey& configKey, in sendBroadcastLocked()
|
/frameworks/base/cmds/statsd/src/external/ |
D | Perfetto.h | 27 class ConfigKey; variable 37 const ConfigKey& configKey);
|
/frameworks/base/cmds/statsd/src/packages/ |
D | UidMap.h | 125 void OnConfigUpdated(const ConfigKey& key); 128 void OnConfigRemoved(const ConfigKey& key); 139 void appendUidMap(const int64_t& timestamp, const ConfigKey& key, std::set<string>* str_set, 198 std::unordered_map<ConfigKey, int64_t> mLastUpdatePerConfigKey;
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | metrics_manager_util.h | 63 bool initConditions(const ConfigKey& key, const StatsdConfig& config, 83 const ConfigKey& key, const StatsdConfig& config, const int64_t timeBaseTimeNs, 97 bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, UidMap& uidMap,
|
/frameworks/base/cmds/statsd/src/anomaly/ |
D | AlarmTracker.h | 39 const Alarm& alarm, const ConfigKey& configKey, 63 const ConfigKey mConfigKey;
|
D | AnomalyTracker.h | 39 AnomalyTracker(const Alert& alert, const ConfigKey& configKey); 130 const ConfigKey mConfigKey;
|
/frameworks/base/cmds/statsd/tests/storage/ |
D | StorageManager_test.cpp | 171 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST() 186 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST() 201 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST() 216 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST()
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | WakelockDuration_e2e_test.cpp | 119 ConfigKey cfgKey; in TEST() 156 ConfigKey cfgKey; in TEST() 193 ConfigKey cfgKey; in TEST() 240 ConfigKey cfgKey; in TEST() 270 ConfigKey cfgKey; in TEST() 302 ConfigKey cfgKey; in TEST()
|
/frameworks/base/cmds/statsd/src/condition/ |
D | StateTracker.h | 30 StateTracker(const ConfigKey& key, const int64_t& id, const int index, 104 const ConfigKey mConfigKey;
|