Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 859b3f0a authored by Luigi Semenzato's avatar Luigi Semenzato Committed by chrome-internal-fetch
Browse files

metrics: add per-version cumulative counters

This adds counters that accumulate some measurement across an OS version;
they are reset at version updates, but reported more frequently (for instance,
daily).

Such counts could be obtained by pseudonymous dremel queries, but this is
more convenient.

The code replaces the "tag" datum in the counters with two tags: a
"report tag" and a "reset tag".  When the report
tag changes, the count is reported but not reset.  When the reset tag
changes, the count is both reported and reset.

This also adds one usage of the new counter which tracks the total
number of kernel crashes since the most recent OS version update.

The state machine in counter.cc changes a bit because it's no longer
true that a counter is reset after reporting it.  That logic is
still rather confusing, and could use a rewrite.

BUG=chromium:339588
TEST=ran on target under various situations
BRANCH=none

Change-Id: I5f83731e1a3d6e055b6d0f89111c9ffc60ccfcb9
Reviewed-on: https://chromium-review.googlesource.com/185081


Reviewed-by: default avatarDaniel Erat <derat@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: default avatarLuigi Semenzato <semenzato@chromium.org>
parent c5a92347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment