History log of /system/update_engine/metrics.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1f19dccb115cf608104b1cb0d192a53ae32f238f 03-Feb-2016 Alex Deymo <deymo@google.com> Add ErrorCode::kUserCanceled.

To accomodate the posibility of canceling an ongoing update, this patch
adds a new ErrorCode signaling a user canceling the update.

This patch also removes the now useless unittests that checks if you
added a new error code since the compiler fails if you don't add the
error code to the method mentioned in the test.

Bug: None
TEST=FEATURES=test emerge-link update_engine
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng

Change-Id: I991dab1dd8b6c0bb0c24d51cca4e1b75440a86b4
/system/update_engine/metrics.h
c1c17b4ed6a3896b6343e737fd89682fa0c8436b 23-Nov-2015 Alex Deymo <deymo@google.com> Report Enum metrics from CertificateChecker.

The certificate checker was reporting a "user action" whenever an
update check HTTPS connection or HTTPS payload download had an invalid
HTTPS certificate or a valid one that was changed since the last
connection to the same server.

This patch sends an Enum metric for every HTTPS connection to check for
and update or download the payload with one of the three options: an
invalid certificate, a valid one already seen or a valid but different
certificate.

This patch also moves these metrics to the metrics.{h,cc} module, where
all the other metrics are reported, using an observer pattern in the
CertificateChecker, needed to remove the dependency on the metrics
library from the libpayload_consumer.

Bug: 25818567
TEST=FEATURES=test emerge-link update_engine; mma;

Change-Id: Ia1b6eb799e13b439b520ba14549d8973e18bcbfa
/system/update_engine/metrics.h
39910dcd1d68987ccee7c3031dc269233a8490bb 10-Nov-2015 Alex Deymo <deymo@google.com> Split payload application code into a subdirectory.

This patch splits from the main libupdate_engine code the part that
is strictly used to download and apply a payload into a new static
library, moving the code to subdirectories. The new library is divided
in two subdirectories: common/ and payload_consumer/, and should not
depend on other update_engine files outside those two subdirectories.
The main difference between those two is that the common/ tools are more
generic and not tied to the payload consumer process, but otherwise they
are both compiled together.

There are still dependencies from the new libpayload_consumer library
into the main directory files and DBus generated files. Those will be
addressed in follow up CLs.

Bug: 25197634
Test: FEATURES=test emerge-link update_engine; `mm` on Brillo.

Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/metrics.h
aea4c1cea20dda7ae7e85fc8924a2d784f70d806 20-Aug-2015 Alex Deymo <deymo@google.com> Re-license update_engine to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi files, the NOTICE was
replaced with a copy of the Apache2 license and MODULE_LICENSE_* file
was updated.

BUG=b/23084294
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
/system/update_engine/metrics.h
cf175a098081f3f0e9ca52d997a7ce1585c14c2d 11-Jul-2014 Gilad Arnold <garnold@chromium.org> Fix cpplint errors.

The only non-obvious change here is the switch from dynamic_cast to
static_cast in three cases of down-casting in UpdateAttempter.
dynamic_cast is banned by style, nor does it add any safety in this
particular case (subsequent code dereferences the result right away
without checking whether it's null).

BUG=None
TEST=None

Change-Id: I9d49b46362feaf9c6fa13b2715ebe9fe50308a9a
Reviewed-on: https://chromium-review.googlesource.com/207470
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/metrics.h
4e1d1495c034c8a81c989622481b6cdf94a50c3c 25-Apr-2014 David Zeuthen <zeuthen@chromium.org> metrics: Emit kAbnormalTermination if last update attempt failed.

This allows us to track how many update attempts terminates
abnormally, for example if the device is rebooted in the middle of an
update or if update_engine crashes. We use a marker state variable
(aka a "prefs" file) to keep track of this.

Note that we don't currently report any of the other metrics in the
UpdateEngine.Attempt.* namespace. If necessary, this can be changed in
the future - I left a TODO item in the code with more details.

BUG=chromium:357676
TEST=New unit tests + Unit tests pass + Manual tests.

Change-Id: I83fe284c7c46917c0c55b92314c58098e2fd1789
Reviewed-on: https://chromium-review.googlesource.com/197175
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/metrics.h
e485ff904198f53d16ab7703796cb9a58292fa3c 21-Apr-2014 David Zeuthen <zeuthen@chromium.org> metrics: Remove unused metrics.

BUG=chromium:365385
TEST=Unit tests pass.

Change-Id: I31a29e3e9a76567f9b365bfac82b6415ec776842
Reviewed-on: https://chromium-review.googlesource.com/195840
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/metrics.h
96197df73f6c804d96eb3a1390eb817f354089d2 16-Apr-2014 David Zeuthen <zeuthen@chromium.org> metrics: Add UpdateEngine.Rollback.Result metric.

Add a metric to track if rollback succeeds or fails. The main use case
for this metric is to record how often rollback actually happens.

Right now we only track success/failure but if we see a lot of
failures in the future, we could add a new metric, for example

UpdateEngine.Rollback.FailureErrorCode

to convey more detail.

BUG=None
TEST=New unit test + unit tests pass.

Change-Id: I5c32d8585dc8e4b6d38c540d2f754ede5b2ad50b
Reviewed-on: https://chromium-review.googlesource.com/195203
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/metrics.h
b281f0768f4d95afcf7378229a1a9f9ec9bd69ab 02-Apr-2014 David Zeuthen <zeuthen@chromium.org> Add UpdateEngine.Attempt.ConnectionType metric.

This adds a new metric so we can track the how the device is connected
to the Internet when an attempt starts.

BUG=chromium:358339
TEST=New unit test + unit tests pass.

Change-Id: Ic5c2f50e2396e6baa288aca70906f7112ef7bca9
Reviewed-on: https://chromium-review.googlesource.com/192864
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/metrics.h
33bae491eded4ef4f1eb4f4ef0f01ef0e5463f3a 26-Feb-2014 David Zeuthen <zeuthen@chromium.org> Add new metrics.

The current metrics (Installer.* namespace) have several shortcomings,
for example it's not immediately clear when and how frequent each
metric is reported. This CL introduces new metrics that addresses this
and other problems. The new metrics are all in the UpdateEngine.*
namespace and fall into five categories

UpdateEngine.Daily.* Reported daily.
UpdateEngine.Check.* On every check.
UpdateEngine.Attempt.* On every attempt.
UpdateEngine.SuccessfulUpdate.* With every successful update.
UpdateEngine.* Miscellaneous

Most of the new metrics mimic existing metrics and also leverage the
existing code, book-keeping and unit tests. The plan is to remove the
Installer.* metrics once we're happy with the new ones.

I've also tested this manually by performing updates and verifying
that chrome://histograms looks correct.

BUG=chromium:355745
TEST=New unit tests + unit tests pass + manual testing.

Change-Id: I7a3f68d75910384b116c7e4664776e25d3997584
Reviewed-on: https://chromium-review.googlesource.com/191314
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/metrics.h