This CL fixes the import path to match the Android format.
The libmetrics headers were also moved to include/metrics to make
exporting headers cleaner.
BUG: 22879597
Change-Id: I67d1ac1746cc3560ae4cbddecf97fa48c9dd1480
This is reported if the TPM was reset during a command
in the first 30 seconds of the previous boot session.
BUG=chromium:431360
TEST=none
BRANCH=none
Change-Id: I66fb453094e5281301cb39d9b86ba5f9c82c10f6
Reviewed-on: https://chromium-review.googlesource.com/261357
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
I missed this when I changed the location used by the metrics
daemon.
BUG=chromium:447256
TEST=none
BRANCH=none
Change-Id: Ie964abb70911bcdc79993b62a066ea77f65acfa5
Reviewed-on: https://chromium-review.googlesource.com/261463
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
In preparation to libchrome uprev, fork off non-protobuf code
from Chromium's metrics component into platform2/metrics.
The current version of Chromium's metrics component has been
significantly refactored and pieces of functionality that
Chromium OS was dependant on (e.g. MetricsLogBase class) has
been removed completely.
So, taking the r293518 version we have been using for a while
and putting it as part of platform2/metrics now.
BUG=None
TEST=FEATURES=test emerge-link metrics
Change-Id: Ib46ac1dff2e2b9cc881e4787b3c6b6250f0bf9c4
Reviewed-on: https://chromium-review.googlesource.com/234635
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Replace NULL with nullptr in C++11-enabled components of platform2
that don't have too many occurrences of NULL. Other major
"offenders" will be handled separately.
BUG=None
TEST=FEATURES=test emerge-link app-shell-launcher buffet easy-unlock platform2 metrics wimax_manager
Change-Id: I61b25a057e3d6865908bc74f9f3d4cb55e08af26
Reviewed-on: https://chromium-review.googlesource.com/214837
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
A constant was left during the refactoring
(https://chromium-review.googlesource.com/#/c/207237/) and it is failing the
generic ASAN buildbot.
BUG=chromium:374368
TEST=FEATURES=test emerge-amd64-generic metrics
Change-Id: Ief9f2a064dbeded87e2e5fc67d3659fedac88867
Reviewed-on: https://chromium-review.googlesource.com/207460
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Convert libmetrics to the new serialization mechanism living in
//components/metrics in the chrome repo.
BUG=chromium:374368
TEST=FEATURES=test emerge-amd64-generic metrics
Change-Id: Ia8cf128d04fedd9672fb47096dc6fd87d6a9043d
Reviewed-on: https://chromium-review.googlesource.com/207237
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
The uma-events file needs to be created earlier, for all users of the
metrics library. This also avoids permission issues with writing
to /var/run/metrics.
BUG=chromium:376891
TEST=manual
CQ-DEPEND=CL:201416
Change-Id: I3a48a3779edb24f3bd08a91fbee4e8fe5a25ec49
Reviewed-on: https://chromium-review.googlesource.com/201347
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
This removes the double metrics even file use to facilitate
the transition. The corresponding change has been in Chromium
for 2 days now.
BUG=chromium:373833
TEST=manually verified
Change-Id: I36ff355e6519b3894c0a4579758ae87bdac6b148
Reviewed-on: https://chromium-review.googlesource.com/200426
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
The event file, which is used for communicating metric events
from chrome os to chrome, has been living in the very non-kosher
location /var/log/metrics/uma-events. This change duplicates it
in /var/run/metrics/uma-events. A later chrome change will pick
up the metrics from there.
I also opened crbug.com/373833 to remove the duplication once
Chrome has switched over.
BUG=chromium:361331
TEST=tested with unit tests and manually
Change-Id: I98b741798aa0481b7987f93f087239ad214b759f
Reviewed-on: https://chromium-review.googlesource.com/200091
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
HANDLE_EINTR is both not safe and not useful on Linux systems.
Switch to IGNORE_EINTR like Chromium has done everywhere.
See http://crbug.com/269623 for details.
BUG=chromium:373154
TEST=`cbuildbot {arm,amd64,x86}-generic-full` passes
Change-Id: I3d99bb2376cb7961ac31ba0fa82bafc1b4c14bd9
Reviewed-on: https://chromium-review.googlesource.com/199821
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Also add 'virtual' and 'OVERRIDE' to overridden methods.
BUG=none
TEST=did a build
Change-Id: Iec71c59853b6ada38b20cea9d0605c3d39e9353f
Reviewed-on: https://chromium-review.googlesource.com/189398
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
This CL updates metrics to build against libchrome-242728 and also converts
libmetrics into slotted libraries (libmetrics-180609 and libmetrics-242728).
BUG=chromium:341521
BUG=chromium:342866
CQ-DEPEND=CL:186027
CQ-DEPEND=CL:186026
CQ-DEPEND=CL:186037
CQ-DEPEND=CL:186092
CQ-DEPEND=CL:186028
CQ-DEPEND=CL:186029
CQ-DEPEND=CL:186038
CQ-DEPEND=CL:186093
CQ-DEPEND=CL:186100
CQ-DEPEND=CL:186039
TEST=Trybot run on paladin, release, and chromiumos-sdk builders.
Change-Id: I09dc3d47cfe24a22864abf217658c63493b35cba
Reviewed-on: https://chromium-review.googlesource.com/185187
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
This adds SpringPowerSupply.Original.Low and SpringPowerSupply.ChargerIdle.
BUG=chrome-os-partner:23973
TEST=manual
Change-Id: I35478741e128891667bfd64c45b379c7c9b7d602
Reviewed-on: https://chromium-review.googlesource.com/176707
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
This adds events to the Platform.CrOSEvent histogram to record
specific situations we're interested in. The user of the events
will be thermal.sh in the daisy overlay.
BUG=chrome-os-partner:23973
TEST=tested manually and observed samples in about:histograms
Change-Id: I1845ce1f90f5e77ecdc294834671328ce13c827b
Reviewed-on: https://chromium-review.googlesource.com/176367
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Samples to these histograms are any 32-bit int value.
BUG=chromium:222189
TEST=manual
Change-Id: Ic8d5773d05d717a275c4a4b5616e0e4c307337b8
Reviewed-on: https://gerrit.chromium.org/gerrit/45897
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Also put event names into an array, so it's easier to add new event names.
BUG=none
TEST=run "strace -e write=3 metrics_client -v Cras.NoCodecsFoundAtBoot" and
verify the event is written.
Change-Id: I925b4ff3b6d362e099df62a11905c1df03fc9435
Reviewed-on: https://gerrit.chromium.org/gerrit/46998
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Tested-by: Chih-Chung Chang <chihchung@chromium.org>
Commit-Queue: Chih-Chung Chang <chihchung@chromium.org>
This change aims to simplify the addition of events we may
want to track in the field, more specifically hard-to-reproduce
bugs. Before this change, this requires creating a new histogram
and registering it via histograms.xml, which is not in the Chrome OS
repositories. With this change, a new event just requires claiming
an event name (such as ModemManagerCommandSendFailure) in
metrics_library.cc, and running "metrics_client -v <event name>"
or calling SendCrosEventToUMA(event_name).
I can make up a bug for this. Or not.
BUG=none
TEST=compiled
Change-Id: I9c56b58310f0d22e77624edee7fe6149abd60a49
Reviewed-on: https://gerrit.chromium.org/gerrit/45322
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
base/eintr_wrapper.h moved to base/posix/eintr_wrapper.h
CQ-DEPEND=Ib19c1382ab28ae7632728aa672478da2feb3950e
BUG=chromium-os:38941
TEST=emerge the metrics package with tests enabled.
STATUS=Fixed
Change-Id: I5d72d8934930ce394786ee151fd8f390b5caf2e1
Reviewed-on: https://gerrit.chromium.org/gerrit/43297
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
BUG=chromium-os:21660
TEST=observed that Platform.* stats appear in about:histograms also when consent is turned off.
Change-Id: Id70f0cca468ec39fdfe687d89a6f0748a2a07828
Reviewed-on: http://gerrit.chromium.org/gerrit/10147
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
BUG=chromium-os:18430
TEST=Update chromeos and check whether the consent for stats is preserved.
Change-Id: I86d4710ef9f381abd9f1eac728040878e6fc5b71
Reviewed-on: http://gerrit.chromium.org/gerrit/5139
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
BUG=chromium-os:17012
TEST=metrics_library_test
This is a second try at committing http://gerrit.chromium.org/gerrit/#change,3865
Change-Id: I8c874ca26dd0d07471cfc66ded527ad5c3a1cd20
Reviewed-on: http://gerrit.chromium.org/gerrit/4578
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
Modification to the function IsGuestMode. It returns true only if the guestfs
partition is mounted and the file /var/run/state/logged-in exits. Previously
it did not check for this file existence.
BUG=chromium-os:15763
TEST=Log in in to guest mode right after installing recovery image and check
the absence of /home/chronos/prev_stats. Log out and log in as a user and
confirm the existence of this directory.
Change-Id: I7b0e7e8844332cca3fa67611b90fada3c5ba0eeb
Reviewed-on: http://gerrit.chromium.org/gerrit/1647
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Modification to the function IsGuestMode. It returns true only if the guestfs
partition is mounted and the file /var/run/state/logged-in exits. Previously
it did not check for this file existence.
BUG=chromium-os:15763
TEST=Log in in to guest mode right after installing recovery image and check
the absence of /home/chronos/prev_stats. Log out and log in as a user and
confirm the existence of this directory.
Change-Id: I29c66642ba590e882e6ec7a02732e818c87ac2ad
Reviewed-on: http://gerrit.chromium.org/gerrit/1586
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@google.com>
Change-Id: I11df903c020141a8123055620f9ad23fedc06c7d
BUG=9352
TEST=
1) UserCrash
2) Crash random process and verify Chrome indicates "other user" crashes
occurred in its stability UMA data.
Review URL: http://codereview.chromium.org/6211001
BUG=10696
TEST=unit tests, tested on the device through metrics_client and inspecting
the uma-events file.
Change-Id: Ie39dd8b5ab968c328993076369a4ba14cb7fcd81
Review URL: http://codereview.chromium.org/6094010
- Remove trailing spaces.
- Convert 'char *' to 'char*'
- Fix other minor style nits
- Many of these issues were pointed out by tfarina.
BUG=none
TEST=Checked that it compiles and passes tests.
Review URL: http://codereview.chromium.org/2693001
Refactor the metrics daemon API a little so that we don't need
to link in libmetrics into the daemon test binary.
Review URL: http://codereview.chromium.org/2079007
- value is int now.
- add seconds to milliseconds option to metrics_client and use it
- chmod chronos/root fix
- style fixes
Review URL: http://codereview.chromium.org/1649007