Loading cmds/statsd/src/StatsLogProcessor.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -211,6 +211,10 @@ void StatsLogProcessor::onDumpReport(const ConfigKey& key, const uint64_t& dumpT void StatsLogProcessor::onDumpReport(const ConfigKey& key, vector<uint8_t>* outData) { std::lock_guard<std::mutex> lock(mMetricsMutex); onDumpReportLocked(key, outData); } void StatsLogProcessor::onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData) { auto it = mMetricsManagers.find(key); if (it == mMetricsManagers.end()) { ALOGW("Config source %s does not exist", key.ToString().c_str()); Loading Loading @@ -319,7 +323,7 @@ void StatsLogProcessor::WriteDataToDisk() { for (auto& pair : mMetricsManagers) { const ConfigKey& key = pair.first; vector<uint8_t> data; onDumpReport(key, &data); onDumpReportLocked(key, &data); // TODO: Add a guardrail to prevent accumulation of file on disk. string file_name = StringPrintf("%s/%d-%lld-%ld", STATS_DATA_DIR, key.GetUid(), (long long)key.GetId(), time(nullptr)); Loading cmds/statsd/src/StatsLogProcessor.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ private: sp<AnomalyMonitor> mAnomalyMonitor; void onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData); /* Check if we should send a broadcast if approaching memory limits and if we're over, we * actually delete the data. */ void flushIfNecessaryLocked(uint64_t timestampNs, const ConfigKey& key, Loading cmds/statsd/src/condition/CombinationConditionTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ void CombinationConditionTracker::evaluateCondition( } } nonSlicedConditionCache[mIndex] = ConditionState::kUnknown; ALOGD("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId, VLOG("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId, conditionChangedCache[mIndex] == true); } } Loading Loading
cmds/statsd/src/StatsLogProcessor.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -211,6 +211,10 @@ void StatsLogProcessor::onDumpReport(const ConfigKey& key, const uint64_t& dumpT void StatsLogProcessor::onDumpReport(const ConfigKey& key, vector<uint8_t>* outData) { std::lock_guard<std::mutex> lock(mMetricsMutex); onDumpReportLocked(key, outData); } void StatsLogProcessor::onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData) { auto it = mMetricsManagers.find(key); if (it == mMetricsManagers.end()) { ALOGW("Config source %s does not exist", key.ToString().c_str()); Loading Loading @@ -319,7 +323,7 @@ void StatsLogProcessor::WriteDataToDisk() { for (auto& pair : mMetricsManagers) { const ConfigKey& key = pair.first; vector<uint8_t> data; onDumpReport(key, &data); onDumpReportLocked(key, &data); // TODO: Add a guardrail to prevent accumulation of file on disk. string file_name = StringPrintf("%s/%d-%lld-%ld", STATS_DATA_DIR, key.GetUid(), (long long)key.GetId(), time(nullptr)); Loading
cmds/statsd/src/StatsLogProcessor.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ private: sp<AnomalyMonitor> mAnomalyMonitor; void onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData); /* Check if we should send a broadcast if approaching memory limits and if we're over, we * actually delete the data. */ void flushIfNecessaryLocked(uint64_t timestampNs, const ConfigKey& key, Loading
cmds/statsd/src/condition/CombinationConditionTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ void CombinationConditionTracker::evaluateCondition( } } nonSlicedConditionCache[mIndex] = ConditionState::kUnknown; ALOGD("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId, VLOG("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId, conditionChangedCache[mIndex] == true); } } Loading