Fix two android metrics reporting in update engine
1. The AttemptCurrentBytesDownloadedMiB was reported in bytes.
2. We were using the same start timestamp (in monotonic_time) for both
boot_time and monotonic_time. This leads to an inaccurate update
duration reporting. This cl saves an extra perf for the boot time and
calculates the duration accordingly.
Also report these information with a different metrics name.
Bug: 30989466
Test: Run an update and check the report
Change-Id: I69e20648501a736a59ff60ca9202ce7bdd9b6e34
diff --git a/common/constants.h b/common/constants.h
index d97c5fb..897d2e2 100644
--- a/common/constants.h
+++ b/common/constants.h
@@ -88,6 +88,7 @@
extern const char kPrefsUpdateStateSHA256Context[];
extern const char kPrefsUpdateStateSignatureBlob[];
extern const char kPrefsUpdateStateSignedSHA256Context[];
+extern const char kPrefsUpdateBootTimestampStart[];
extern const char kPrefsUpdateTimestampStart[];
extern const char kPrefsUrlSwitchCount[];
extern const char kPrefsWallClockScatteringWaitPeriod[];