Remove kPullerCooldownMap from code
remove dead code Bug: 74032852 Test: manual test Change-Id: I0da74be21bab5842a89ede2a272094ba5ee33d80
This commit is contained in:
7
cmds/statsd/src/external/StatsPuller.cpp
vendored
7
cmds/statsd/src/external/StatsPuller.cpp
vendored
@@ -21,6 +21,7 @@
|
||||
#include "guardrail/StatsdStats.h"
|
||||
#include "puller_util.h"
|
||||
#include "stats_log_util.h"
|
||||
#include "StatsPullerManagerImpl.h"
|
||||
|
||||
namespace android {
|
||||
namespace os {
|
||||
@@ -34,11 +35,7 @@ void StatsPuller::SetUidMap(const sp<UidMap>& uidMap) { mUidMap = uidMap; }
|
||||
// ValueMetric has a minimum bucket size of 10min so that we don't pull too frequently
|
||||
StatsPuller::StatsPuller(const int tagId)
|
||||
: mTagId(tagId) {
|
||||
if (StatsdStats::kPullerCooldownMap.find(tagId) == StatsdStats::kPullerCooldownMap.end()) {
|
||||
mCoolDownSec = StatsdStats::kDefaultPullerCooldown;
|
||||
} else {
|
||||
mCoolDownSec = StatsdStats::kPullerCooldownMap[tagId];
|
||||
}
|
||||
mCoolDownSec = StatsPullerManagerImpl::kAllPullAtomInfo.find(tagId)->second.coolDownSec;
|
||||
VLOG("Puller for tag %d created. Cooldown set to %ld", mTagId, mCoolDownSec);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,18 +91,6 @@ const int FIELD_ID_UID_MAP_BYTES_USED = 3;
|
||||
const int FIELD_ID_UID_MAP_DROPPED_SNAPSHOTS = 4;
|
||||
const int FIELD_ID_UID_MAP_DROPPED_CHANGES = 5;
|
||||
|
||||
std::map<int, long> StatsdStats::kPullerCooldownMap = {
|
||||
{android::util::KERNEL_WAKELOCK, 1},
|
||||
{android::util::WIFI_BYTES_TRANSFER, 1},
|
||||
{android::util::MOBILE_BYTES_TRANSFER, 1},
|
||||
{android::util::WIFI_BYTES_TRANSFER_BY_FG_BG, 1},
|
||||
{android::util::MOBILE_BYTES_TRANSFER_BY_FG_BG, 1},
|
||||
{android::util::SUBSYSTEM_SLEEP_STATE, 1},
|
||||
{android::util::CPU_TIME_PER_FREQ, 1},
|
||||
{android::util::CPU_TIME_PER_UID, 1},
|
||||
{android::util::CPU_TIME_PER_UID_FREQ, 1},
|
||||
};
|
||||
|
||||
// TODO: add stats for pulled atoms.
|
||||
StatsdStats::StatsdStats() {
|
||||
mPushedAtomStats.resize(android::util::kMaxPushedAtomId + 1);
|
||||
|
||||
@@ -111,13 +111,6 @@ public:
|
||||
/* Min period between two checks of byte size per config key in nanoseconds. */
|
||||
static const unsigned long long kMinByteSizeCheckPeriodNs = 10 * NS_PER_SEC;
|
||||
|
||||
// Default minimum interval between pulls for an atom. Pullers can return cached values if
|
||||
// another pull request happens within this interval.
|
||||
static std::map<int, long> kPullerCooldownMap;
|
||||
|
||||
// Default cooldown time for a puller
|
||||
static const long kDefaultPullerCooldown = 1;
|
||||
|
||||
// Maximum age (30 days) that files on disk can exist in seconds.
|
||||
static const int kMaxAgeSecond = 60 * 60 * 24 * 30;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user