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

Skip to content
Commit e4fa61e0 authored by Bertrand SIMONNET's avatar Bertrand SIMONNET Committed by ChromeOS Commit Bot
Browse files

metrics: don't upload metrics when metrics are disabled

The uploader should only send metrics samples when the metrics are
enabled.
The uploader daemon is still started when the metrics are disabled so
that:
* When we enable the metrics, we don't require a restart of
  metrics_daemon to start uploading metrics.
* The metrics file is truncated periodically and avoid taking too much
  space on long running system with metrics disabled.

BUG=chromium:459636
TEST=unittests
TEST=`test_that -b gizmo gizmo platform_MetricsUploader` works
TEST=manual: uploader does not upload metrics if metrics are disabled.

CQ-DEPEND=CL:250980

Change-Id: I9f5da3457066a183c5791b5488e985b7ab13b6e1
Reviewed-on: https://chromium-review.googlesource.com/250822


Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: default avatarBertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: default avatarNathan Bullock <nathanbullock@google.com>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
parent 067ec8ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment