summaryrefslogtreecommitdiff
path: root/core/java/android/os/RecoverySystem.java
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-09-16 18:36:20 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-16 18:36:20 +0000
commit1579ce8a1d57a21ee41fd8c4d5ce79ebe194a6f5 (patch)
tree19a4a5327848b065c1723f343504951cbd18006c /core/java/android/os/RecoverySystem.java
parent7aafc81c2e07262e77ac5108407403bc4a522f96 (diff)
parent79d27bdeacfa1e25ca2f4fa727c731ac15bd1cde (diff)
Merge "Collect status on uncrypt time cost" am: bc19e00d35
am: 79d27bdeac Change-Id: I64f13dbe40845eecb584c0f45a169e0c948275ab
Diffstat (limited to 'core/java/android/os/RecoverySystem.java')
-rw-r--r--core/java/android/os/RecoverySystem.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index dd7be53d9865..028e30ab93f0 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -695,6 +695,7 @@ public class RecoverySystem {
String line = null;
int bytesWrittenInMiB = -1, bytesStashedInMiB = -1;
int timeTotal = -1;
+ int uncryptTime = -1;
int sourceVersion = -1;
while ((line = in.readLine()) != null) {
// Here is an example of lines in last_install:
@@ -730,6 +731,8 @@ public class RecoverySystem {
if (line.startsWith("time")) {
timeTotal = scaled;
+ } else if (line.startsWith("uncrypt_time")) {
+ uncryptTime = scaled;
} else if (line.startsWith("source_build")) {
sourceVersion = scaled;
} else if (line.startsWith("bytes_written")) {
@@ -745,6 +748,9 @@ public class RecoverySystem {
if (timeTotal != -1) {
MetricsLogger.histogram(context, "ota_time_total", timeTotal);
}
+ if (uncryptTime != -1) {
+ MetricsLogger.histogram(context, "ota_uncrypt_time", uncryptTime);
+ }
if (sourceVersion != -1) {
MetricsLogger.histogram(context, "ota_source_version", sourceVersion);
}