/packages/modules/StatsD/statsd/src/config/ |
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 | ConfigKey.h | 33 class ConfigKey { 35 ConfigKey(); 36 ConfigKey(const ConfigKey& that); 37 ConfigKey(int uid, int64_t id); 38 ~ConfigKey(); 47 inline bool operator<(const ConfigKey& that) const { 57 inline bool operator==(const ConfigKey& that) const { 78 struct std::hash<android::os::statsd::ConfigKey> { 79 std::size_t operator()(const android::os::statsd::ConfigKey& key) const {
|
D | ConfigManager.h | 66 void UpdateConfig(const ConfigKey& key, const StatsdConfig& data); 71 void SetConfigReceiver(const ConfigKey& key, const shared_ptr<IPendingIntentRef>& pir); 76 const shared_ptr<IPendingIntentRef> GetConfigReceiver(const ConfigKey& key) const; 81 std::vector<ConfigKey> GetAllConfigKeys() const; 86 void RemoveConfigReceiver(const ConfigKey& key); 92 void RemoveConfigReceiver(const ConfigKey& key, const shared_ptr<IPendingIntentRef>& pir); 144 void RemoveConfig(const ConfigKey& key); 167 void update_saved_configs_locked(const ConfigKey& key, 174 void remove_saved_configs(const ConfigKey& key); 179 std::map<int, std::set<ConfigKey>> mConfigs; [all …]
|
D | ConfigManager.cpp | 52 map<ConfigKey, StatsdConfig> configsFromDisk; in Startup() 68 void ConfigManager::UpdateConfig(const ConfigKey& key, const StatsdConfig& config) { in UpdateConfig() 115 void ConfigManager::SetConfigReceiver(const ConfigKey& key, in SetConfigReceiver() 121 void ConfigManager::RemoveConfigReceiver(const ConfigKey& key) { in RemoveConfigReceiver() 126 void ConfigManager::RemoveConfigReceiver(const ConfigKey& key, in RemoveConfigReceiver() 232 void ConfigManager::RemoveConfig(const ConfigKey& key) { in RemoveConfig() 256 void ConfigManager::remove_saved_configs(const ConfigKey& key) { in remove_saved_configs() 263 vector<ConfigKey> removed; in RemoveConfigs() 294 vector<ConfigKey> removed; in RemoveAllConfigs() 320 vector<ConfigKey> ConfigManager::GetAllConfigKeys() const { in GetAllConfigKeys() [all …]
|
/packages/modules/StatsD/statsd/src/utils/ |
D | DbUtils.h | 37 string getDbName(const ConfigKey& key); 42 bool createTableIfNeeded(const ConfigKey& key, int64_t metricId, const LogEvent& event); 47 bool isEventCompatible(const ConfigKey& key, int64_t metricId, const LogEvent& event); 50 bool deleteTable(const ConfigKey& key, int64_t metricId); 53 void deleteDb(const ConfigKey& key); 58 sqlite3* getDb(const ConfigKey& key); 66 bool insert(const ConfigKey& key, int64_t metricId, const vector<LogEvent>& events, string& error); 74 bool query(const ConfigKey& key, const string& zSql, vector<vector<string>>& rows, 80 void verifyIntegrityAndDeleteIfNecessary(const ConfigKey& key); 83 bool updateDeviceInfoTable(const ConfigKey& key, string& error);
|
D | DbUtils.cpp | 94 string getDbName(const ConfigKey& key) { in getDbName() 137 bool createTableIfNeeded(const ConfigKey& key, const int64_t metricId, const LogEvent& event) { in createTableIfNeeded() 156 bool isEventCompatible(const ConfigKey& key, const int64_t metricId, const LogEvent& event) { in isEventCompatible() 190 bool deleteTable(const ConfigKey& key, const int64_t metricId) { in deleteTable() 208 void deleteDb(const ConfigKey& key) { in deleteDb() 213 sqlite3* getDb(const ConfigKey& key) { in getDb() 283 bool insert(const ConfigKey& key, const int64_t metricId, const vector<LogEvent>& events, in insert() 314 bool query(const ConfigKey& key, const string& zSql, vector<vector<string>>& rows, in query() 378 void verifyIntegrityAndDeleteIfNecessary(const ConfigKey& configKey) { in verifyIntegrityAndDeleteIfNecessary() 452 bool updateDeviceInfoTable(const ConfigKey& key, string& error) { in updateDeviceInfoTable()
|
/packages/modules/StatsD/statsd/src/guardrail/ |
D | StatsdStats.h | 321 void noteConfigReceived(const ConfigKey& key, int metricsCount, int conditionsCount, 328 void noteConfigRemoved(const ConfigKey& key); 332 void noteConfigReset(const ConfigKey& key); 337 void noteBroadcastSent(const ConfigKey& key); 344 void noteActiveStatusChanged(const ConfigKey& key, bool activate); 349 void noteDataDropped(const ConfigKey& key, const size_t totalBytes); 356 void noteMetricsReportSent(const ConfigKey& key, const size_t numBytes, 362 void noteDeviceInfoTableCreationFailed(const ConfigKey& key); 367 void noteDbCorrupted(const ConfigKey& key); 372 void noteDbSizeExceeded(const ConfigKey& key); [all …]
|
D | StatsdStats.cpp | 247 const ConfigKey& key, int metricsCount, int conditionsCount, int matchersCount, in noteConfigReceived() 278 void StatsdStats::noteConfigRemovedInternalLocked(const ConfigKey& key) { in noteConfigRemovedInternalLocked() 288 void StatsdStats::noteConfigRemoved(const ConfigKey& key) { in noteConfigRemoved() 293 void StatsdStats::noteConfigResetInternalLocked(const ConfigKey& key) { in noteConfigResetInternalLocked() 300 void StatsdStats::noteConfigReset(const ConfigKey& key) { in noteConfigReset() 358 void StatsdStats::noteBroadcastSent(const ConfigKey& key) { in noteBroadcastSent() 362 void StatsdStats::noteBroadcastSent(const ConfigKey& key, int32_t timeSec) { in noteBroadcastSent() 375 void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated) { in noteActiveStatusChanged() 379 void StatsdStats::noteActiveStatusChanged(const ConfigKey& key, bool activated, int32_t timeSec) { in noteActiveStatusChanged() 407 void StatsdStats::noteDataDropped(const ConfigKey& key, const size_t totalBytes) { in noteDataDropped() [all …]
|
/packages/modules/StatsD/statsd/src/ |
D | StatsLogProcessor.h | 44 const std::function<bool(const ConfigKey&)>& sendBroadcast, 46 const std::function<void(const ConfigKey&, const string&, const vector<int64_t>&)>& 54 void OnConfigUpdated(const int64_t timestampNs, int64_t wallClockNs, const ConfigKey& key, 57 void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, 59 void OnConfigRemoved(const ConfigKey& key); 61 size_t GetMetricsSize(const ConfigKey& key) const; 65 void onDumpReport(const ConfigKey& key, int64_t dumpTimeNs, int64_t wallClockNs, 69 void onDumpReport(const ConfigKey& key, int64_t dumpTimeNs, int64_t wallClockNs, 74 void onDumpReport(const ConfigKey& key, int64_t dumpTimeNs, 147 int64_t getLastReportTimeNs(const ConfigKey& key); [all …]
|
D | StatsLogProcessor.cpp | 97 const int64_t timeBaseNs, const std::function<bool(const ConfigKey&)>& sendBroadcast, in StatsLogProcessor() 99 const std::function<void(const ConfigKey&, const string&, const vector<int64_t>&)>& in StatsLogProcessor() argument 385 std::vector<ConfigKey> configKeys; in resetConfigsLocked() 546 const ConfigKey& key, const StatsdConfig& config, in OnConfigUpdated() 553 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, in OnConfigUpdated() 558 void StatsLogProcessor::OnConfigUpdatedLocked(const int64_t timestampNs, const ConfigKey& key, in OnConfigUpdatedLocked() 639 size_t StatsLogProcessor::GetMetricsSize(const ConfigKey& key) const { in GetMetricsSize() 660 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs, in onDumpReport() 723 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs, in onDumpReport() 742 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs, in onDumpReport() [all …]
|
/packages/modules/StatsD/statsd/tests/ |
D | ConfigManager_test.cpp | 47 MOCK_METHOD4(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 | StatsLogProcessor_test.cpp | 57 MockMetricsManager(ConfigKey configKey = ConfigKey(1, 12345)) in MockMetricsManager() 90 [](const ConfigKey& key) { return true; }, in TEST() 92 [](const ConfigKey&, const string&, const vector<int64_t>&) {}, in TEST() argument 97 ConfigKey key(100, 12345); in TEST() 114 [&broadcastCount](const ConfigKey& key) { in TEST() 119 [](const ConfigKey&, const string&, const vector<int64_t>&) {}, in TEST() argument 124 ConfigKey key(100, 12345); in TEST() 149 [&broadcastCount](const ConfigKey& key) { in TEST() 154 [](const ConfigKey&, const string&, const vector<int64_t>&) {}, in TEST() argument 159 ConfigKey key(100, 12345); in TEST() [all …]
|
/packages/modules/StatsD/statsd/src/storage/ |
D | StorageManager.h | 109 const std::function<void(const ConfigKey&)>& sendBroadcast); 114 static bool hasConfigMetricsReport(const ConfigKey& key); 130 static void appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto, 136 static void readConfigFromDisk(std::map<ConfigKey, StatsdConfig>& configsMap); 142 static bool readConfigFromDisk(const ConfigKey& key, StatsdConfig* config); 143 static bool readConfigFromDisk(const ConfigKey& key, string* config); 154 static bool hasIdenticalConfig(const ConfigKey& key,
|
D | StorageManager.cpp | 126 static ConfigKey parseDbName(char* name) { in parseDbName() 130 return ConfigKey(-1, -1); in parseDbName() 132 return ConfigKey(StrToInt64(uid), StrToInt64(configId)); in parseDbName() 506 const std::function<void(const ConfigKey&)>& sendBroadcast) { in sendBroadcast() 522 sendBroadcast(ConfigKey((int)output.mUid, output.mConfigId)); in sendBroadcast() 526 bool StorageManager::hasConfigMetricsReport(const ConfigKey& key) { in hasConfigMetricsReport() 554 void StorageManager::appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto, in appendConfigMetricsReport() 616 void StorageManager::readConfigFromDisk(map<ConfigKey, StatsdConfig>& configsMap) { in readConfigFromDisk() argument 639 configsMap[ConfigKey(output.mUid, output.mConfigId)] = config; in readConfigFromDisk() 649 bool StorageManager::readConfigFromDisk(const ConfigKey& key, StatsdConfig* config) { in readConfigFromDisk() [all …]
|
/packages/modules/StatsD/statsd/src/external/ |
D | StatsPullerManager.h | 72 virtual void RegisterReceiver(int tagId, const ConfigKey& configKey, 77 virtual void UnRegisterReceiver(int tagId, const ConfigKey& configKey, 82 virtual void RegisterPullUidProvider(const ConfigKey& configKey, 86 virtual void UnregisterPullUidProvider(const ConfigKey& configKey, 105 virtual bool Pull(int tagId, const ConfigKey& configKey, int64_t eventTimeNs, 136 const ConfigKey configKey; 153 std::map<ConfigKey, wp<PullUidProvider>> mPullUidProviders; 155 bool PullLocked(int tagId, const ConfigKey& configKey, int64_t eventTimeNs,
|
/packages/modules/StatsD/service/java/com/android/server/stats/ |
D | StatsManagerService.java | 71 private ArrayMap<ConfigKey, PendingIntentRef> mDataFetchPirMap = new ArrayMap<>(); 75 private ArrayMap<ConfigKey, ArrayMap<Long, PendingIntentRef>> mBroadcastSubscriberPirMap = 86 private static class ConfigKey { class in StatsManagerService 90 ConfigKey(int uid, long configId) { in ConfigKey() method in StatsManagerService.ConfigKey 110 if (obj instanceof ConfigKey) { in equals() 111 ConfigKey other = (ConfigKey) obj; in equals() 285 ConfigKey key = new ConfigKey(callingUid, configId); in setDataFetchOperation() 307 ConfigKey key = new ConfigKey(callingUid, configId); in removeDataFetchOperation() 374 ConfigKey key = new ConfigKey(callingUid, configId); in setBroadcastSubscriber() 400 ConfigKey key = new ConfigKey(callingUid, configId); in unsetBroadcastSubscriber() [all …]
|
/packages/modules/StatsD/statsd/benchmark/ |
D | db_benchmark.cpp | 29 ConfigKey key = ConfigKey(111, 222); in BM_insertAtomsIntoDbTablesNewConnection() 61 ConfigKey key = ConfigKey(111, 222); in BM_insertAtomsIntoDbTablesReuseConnection() 95 ConfigKey key = ConfigKey(111, 222); in BM_createDbTables()
|
/packages/modules/StatsD/statsd/src/subscriber/ |
D | SubscriberReporter.h | 59 void setBroadcastSubscriber(const ConfigKey& configKey, 66 void unsetBroadcastSubscriber(const ConfigKey& configKey, int64_t subscriberId); 73 void alertBroadcastSubscriber(const ConfigKey& configKey, 83 unordered_map<ConfigKey, unordered_map<int64_t, shared_ptr<IPendingIntentRef>>> mIntentMap; 90 const ConfigKey& configKey,
|
D | SubscriberReporter.cpp | 58 void SubscriberReporter::setBroadcastSubscriber(const ConfigKey& configKey, in setBroadcastSubscriber() 78 void SubscriberReporter::unsetBroadcastSubscriber(const ConfigKey& configKey, in unsetBroadcastSubscriber() 91 void SubscriberReporter::alertBroadcastSubscriber(const ConfigKey& configKey, in alertBroadcastSubscriber() 133 const ConfigKey& configKey, in sendBroadcastLocked()
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | metrics_test_helper.h | 37 void(int tagId, const ConfigKey& key, const wp<PullDataReceiver>& receiver, 40 void(int tagId, const ConfigKey& key, const wp<PullDataReceiver>& receiver)); 41 MOCK_METHOD4(Pull, bool(const int pullCode, const ConfigKey& key, int64_t eventTimeNs, 46 void(const ConfigKey& configKey, const wp<PullUidProvider>& provider)); 48 void(const ConfigKey& configKey, const wp<PullUidProvider>& provider));
|
D | NumericValueMetricProducer_test.cpp | 49 const ConfigKey kConfigKey(0, 12345); 302 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t, in TEST() 367 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs, in TEST_P() 375 .WillOnce(Invoke([partialBucketSplitTimeNs](int tagId, const ConfigKey&, in TEST_P() argument 427 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t, in TEST() 589 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs, in TEST() 596 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs, in TEST() argument 603 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs, in TEST() argument 728 .WillOnce(Invoke([partialBucketSplitTimeNs](int tagId, const ConfigKey&, in TEST_P() 805 .WillOnce(Invoke([](int tagId, const ConfigKey&, const int64_t eventTimeNs, in TEST_P() [all …]
|
/packages/modules/StatsD/statsd/tests/subscriber/ |
D | SubscriberReporter_test.cpp | 35 const ConfigKey configKey1(0, 12345); 36 const ConfigKey configKey2(0, 123456); 74 unordered_map<ConfigKey, unordered_map<int64_t, shared_ptr<IPendingIntentRef>>> in TEST_F() 84 unordered_map<ConfigKey, unordered_map<int64_t, shared_ptr<IPendingIntentRef>>> in TEST_F() 97 unordered_map<ConfigKey, unordered_map<int64_t, shared_ptr<IPendingIntentRef>>> in TEST_F()
|
/packages/modules/StatsD/statsd/src/metrics/parsing_utils/ |
D | metrics_manager_util.h | 56 const ConfigKey& key, const Predicate& predicate, int index, 101 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 121 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 141 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 159 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 181 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 201 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseNs, 304 const ConfigKey& key, const StatsdConfig& config, 343 const ConfigKey& key, const StatsdConfig& config, int64_t timeBaseTimeNs, 363 optional<InvalidConfigReason> initAlarms(const StatsdConfig& config, const ConfigKey& key, [all …]
|
/packages/modules/StatsD/statsd/tests/storage/ |
D | StorageManager_test.cpp | 150 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST() 165 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST() 180 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST() 195 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST() 288 ConfigKey key(123, 12345); in TEST() 306 ConfigKey key(123, 12345); in TEST()
|
/packages/modules/StatsD/statsd/tests/e2e/ |
D | ConfigUpdate_e2e_ab_test.cpp | 73 ConfigKey cfgKey(0, 12345); in TEST_P() 115 ConfigKey cfgKey(0, 12345); in TEST_P() 148 ConfigKey cfgKey(0, 12345); in TEST_P() 175 ConfigKey cfgKey(0, 12345); in TEST_P() 222 ConfigKey cfgKey(0, 12345); in TEST_P() 248 ConfigKey cfgKey(0, 12345); in TEST_P() 288 ConfigKey cfgKey(0, 12345); in TEST_P() 320 ConfigKey key(123, 987); in TEST_P()
|