diff options
| author | 2016-05-03 18:48:55 +0000 | |
|---|---|---|
| committer | 2016-05-03 18:48:56 +0000 | |
| commit | 49bdf11cd5e388c0c91cfa095f3b6314902f9994 (patch) | |
| tree | 274b0969cfa2fd897ed66eed0abba3fdba27262b | |
| parent | 44b28493cad3fcc2708c58a8bd1a40d6dd1e64eb (diff) | |
| parent | 15c4e31b0f7226987267656926c98d2c5d53585a (diff) | |
Merge "Change low power stats format to make it easier for parsing" into nyc-dev
| -rw-r--r-- | services/core/jni/com_android_server_am_BatteryStatsService.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/services/core/jni/com_android_server_am_BatteryStatsService.cpp b/services/core/jni/com_android_server_am_BatteryStatsService.cpp index 183a370bac0d..ecdc71e61270 100644 --- a/services/core/jni/com_android_server_am_BatteryStatsService.cpp +++ b/services/core/jni/com_android_server_am_BatteryStatsService.cpp @@ -234,8 +234,9 @@ static jint getPlatformLowPowerStats(JNIEnv* env, jobject /* clazz */, jobject o for (int i = 0; i < num_modes; i++) { int added; - added = snprintf(offset, remaining, "%s_time=%" PRIu64 " %s_count=%" PRIu64 " ", - list[i].name, list[i].residency_in_msec_since_boot, list[i].name, + added = snprintf(offset, remaining, + "state_%d name=%s time=%" PRIu64 " count=%" PRIu64 " ", + i + 1, list[i].name, list[i].residency_in_msec_since_boot, list[i].total_transitions); if (added < 0) { break; @@ -248,10 +249,10 @@ static jint getPlatformLowPowerStats(JNIEnv* env, jobject /* clazz */, jobject o total_added += added; for (unsigned int j = 0; j < list[i].number_of_voters; j++) { - added = snprintf(offset, remaining, "%s_time=%" PRIu64 " %s_count=%" PRIu64 " ", - list[i].voters[j].name, + added = snprintf(offset, remaining, + "voter_%d name=%s time=%" PRIu64 " count=%" PRIu64 " ", + j + 1, list[i].voters[j].name, list[i].voters[j].total_time_in_msec_voted_for_since_boot, - list[i].voters[j].name, list[i].voters[j].total_number_of_times_voted_since_boot); if (added < 0) { break; |