summaryrefslogtreecommitdiff
path: root/libs/services/src/os/StatsLogEventWrapper.cpp
diff options
context:
space:
mode:
authorBookatz <bookatz@google.com>2018-11-09 12:27:37 -0800
committerBookatz <bookatz@google.com>2018-11-14 18:13:58 -0800
commit75ee6042443bfe22dc779609697881fc83ed23db (patch)
tree3610691da91a8955408cfe4bc18c8fb2aa4e78e2 /libs/services/src/os/StatsLogEventWrapper.cpp
parente9f5e860547e7314c4c0e03fa4838c5b06164f5d (diff)
Statsd atom: Power Use
BatteryStats calculates power usage of the device and various components (such as apps). This information is used, e.g., in the battery panel of Settings. We now log it to statsd. It can be used for validating how good the information displayed in Settings is. In the long-term, it is likely not ideal for off-device calculations, since that can be hopefully estimated using statsd's raw data. Three atoms: one for the total power use, one for the power use of each uid, and one for each non-uid component. Since they will all likely be pulled together, StatsCompanionService will provide stale data for BatteryStats pulls called within a second of a previous BatteryStats pull. Also in this cl: Remove StatsLogEventWrapper.writeDouble. Statsd doesn't support actually writing doubles into its proto reports, so having this function is misleading (the data will get to statsd and then be completely ignored). It's less confusing if we don't pretend it does something. Change-Id: If80bab8ea938afa4632535bb88ff59879fbe8099 Fixes: 119111972 Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid Test: BatteryStatsHelperTest#testDrainTypesSyncedWithProto
Diffstat (limited to 'libs/services/src/os/StatsLogEventWrapper.cpp')
-rw-r--r--libs/services/src/os/StatsLogEventWrapper.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/libs/services/src/os/StatsLogEventWrapper.cpp b/libs/services/src/os/StatsLogEventWrapper.cpp
index a1a6d9fe0e22..04c4629b5432 100644
--- a/libs/services/src/os/StatsLogEventWrapper.cpp
+++ b/libs/services/src/os/StatsLogEventWrapper.cpp
@@ -85,9 +85,6 @@ status_t StatsLogEventWrapper::readFromParcel(const Parcel* in) {
case StatsLogValue::FLOAT:
mElements.push_back(StatsLogValue(in->readFloat()));
break;
- case StatsLogValue::DOUBLE:
- mElements.push_back(StatsLogValue(in->readDouble()));
- break;
case StatsLogValue::STORAGE:
mElements.push_back(StatsLogValue());
mElements.back().setType(StatsLogValue::STORAGE);