Commit graph

48 commits

Author SHA1 Message Date
Bertrand SIMONNET
4b915ae1b2 metrics: Fix import paths for headers.
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
2015-08-07 13:39:14 -07:00
Luigi Semenzato
538e2090cd metrics: add TPM.EarlyResetDuringCommand CrOS event.
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>
2015-03-31 06:34:31 +00:00
Luigi Semenzato
93408425ea metrics: make metrics library also use /var/lib/metrics/uma-events
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>
2015-03-20 23:06:52 +00:00
Alex Vakulenko
788d3b6365 metrics: fork metrics sources from Chromium source base
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>
2014-12-12 21:38:08 +00:00
Alex Vakulenko
14595032aa platform2: Replace NULL with nullptr in minor components
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>
2014-08-29 21:58:46 +00:00
Bertrand SIMONNET
5984b2116c metrics: remove unused constant
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>
2014-07-11 04:58:23 +00:00
Bertrand SIMONNET
d83ca801ad metrics: Use the new serialization mechanism in libmetrics
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>
2014-07-10 21:22:14 +00:00
Luigi Semenzato
a5db220722 metrics daemon: create /var/run/metrics/uma-events earlier
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>
2014-05-28 10:33:26 +00:00
Luigi Semenzato
31cda9806e metrics library: complete switchover from /var/log to /var/run
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>
2014-05-19 23:06:27 +00:00
Luigi Semenzato
960e0e12c0 metrics library: move event file location from /var/log to /var/run
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>
2014-05-16 04:18:02 +00:00
Luigi Semenzato
41c5450523 metrics library: convert to proper C++/libbase
This mostly converts fprintfs to proper logs, char* to
std::string wherever appropriate.

BUG=chromium:355796
TEST=unit tests

Change-Id: Ieb1cb110be5e281b7e0c764a0dfce895f33d4a3c
Reviewed-on: https://chromium-review.googlesource.com/199610
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
2014-05-15 19:06:02 +00:00
Mike Frysinger
3e8a851625 use IGNORE_EINTR w/close
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>
2014-05-15 07:41:00 +00:00
Daniel Erat
fd158294da metrics: Make implicit MetricsLibrary d'tor explicit.
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>
2014-03-10 07:47:27 +00:00
Ben Chan
2e6543ddad Update to build against libchrome-242728.
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>
2014-02-12 19:39:45 +00:00
Darren Krahn
09a15fa954 Added a metric for tracking non-zero TPM dictionary-attack counters.
BUG=chromium:341358
TEST=manual

Change-Id: I99d3e4279c6d9185b9b515259d4fe511e0d79874
Reviewed-on: https://chromium-review.googlesource.com/185493
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
2014-02-08 04:21:15 +00:00
Luigi Semenzato
e8fd968af0 Add two more charger states to Platform.CrOSEvent.
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>
2013-11-14 03:34:27 +00:00
Luigi Semenzato
e57398a6ee Define UMA events for interesting power adapter situations.
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>
2013-11-12 01:07:05 +00:00
Darren Krahn
86830baa17 Added cros event name for attestation metric.
BUG=chromium:260504
TEST=unit

Change-Id: If1c7218a02bd6bac8193c4ac550866b06b475f2a
Reviewed-on: https://gerrit.chromium.org/gerrit/63495
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
2013-08-05 20:53:24 -07:00
Darren Krahn
6e55c11537 Define cros event names for chaps database failures.
BUG=chrome-os-partner:17610
TEST=emerge

Change-Id: Ic12379645ad1c72388aa4a4758fa4bea5b2f554d
Reviewed-on: https://gerrit.chromium.org/gerrit/62698
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
2013-07-19 18:01:51 -07:00
Luigi Semenzato
a7ebeb3e8b Add sparse histograms to the metrics library and metrics client.
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>
2013-04-30 15:54:38 -07:00
Chih-Chung Chang
6844c06107 metrics: Add Cras.NoCodecsFoundAtBoot event to CrosEvents
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>
2013-04-02 21:56:20 -07:00
Grant Grundler
4b5164bb9e metrics: add HwWatchdogReboot to CrosEvents
Add HwWatchdogReboot to CrosEvents support.

BUG=chromium:221000
TEST=none

Change-Id: I7388c6d1ee93a73f930d591552b18ea7bba7743f
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46593
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
2013-03-28 18:27:14 -07:00
Luigi Semenzato
3268422240 Add generic "event of interest" enumerated histogram.
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>
2013-03-13 16:05:39 -07:00
Chris Masone
e10b548cf5 [metrics] Update metrics to build against libchrome-180609
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>
2013-02-14 14:03:28 -08:00
Julian Pastarmov
d605a005d6 Make policy reloads explicit.
BUG=chromium-os:38541
TEST=unit tests pass

CQ-DEPEND=I20461078ca890c6ec2f81ad5383c06c4d75a64cd

Change-Id: I042e9d1cfbefa479ff18c0b1bc170a15cec705bc
Reviewed-on: https://gerrit.chromium.org/gerrit/42538
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Queue: Julian Pastarmov <pastarmovj@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2013-02-05 09:45:39 -08:00
Luigi Semenzato
df3e4529ca Sends metrics to Chrome even when user did not consent to send stats.
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>
2011-10-21 01:08:26 -07:00
Julian Pastarmov
70b7abd84f Respect the metrics file if no policy value is set (for legacy migration).
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>
2011-08-04 01:38:02 -07:00
Ken Mixter
b2f170970e Revert "Revert "Make the metrics library respect the policy settings instead of the consent file.""
This reverts commit aa91d046ac27a9bdc96e6cd9438741d98f1cef66

Change-Id: I1c84fb86d6eb56a5a8e88136c98104394be697b2
Reviewed-on: http://gerrit.chromium.org/gerrit/4614
Reviewed-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ken Mixter <kmixter@chromium.org>
2011-07-22 16:06:45 -07:00
Julian Pastarmov
a3df284fe1 Revert "Make the metrics library respect the policy settings instead of the consent file."
This reverts commit 8c874ca26dd0d07471cfc66ded527ad5c3a1cd20

Change-Id: Iaa91d046ac27a9bdc96e6cd9438741d98f1cef66
Reviewed-on: http://gerrit.chromium.org/gerrit/4583
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
2011-07-22 10:22:10 -07:00
Julian Pastarmov
ff3eb194b0 Make the metrics library respect the policy settings instead of the consent file.
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>
2011-07-22 09:16:40 -07:00
Ken Mixter
ec380e84c5 Revert "Make the metrics library respect the policy settings instead of the consent file."
This reverts commit 6a294b4a3e9aa69dc9c429ed398e9dd7615029f2

Change-Id: I7d80b119d4e2b880f75c2293770e073785764e7d
Reviewed-on: http://gerrit.chromium.org/gerrit/4509
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ken Mixter <kmixter@chromium.org>
2011-07-21 14:34:27 -07:00
Julian Pastarmov
a2ce30fdde Make the metrics library respect the policy settings instead of the consent file.
BUG=chromium-os:17012
TEST=metrics_library_test

Change-Id: I133b19a672f52d5ba4f150aa75d1b32af2896c3f
Reviewed-on: http://gerrit.chromium.org/gerrit/3865
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ken Mixter <kmixter@chromium.org>
2011-07-21 14:10:34 -07:00
Arkaitz Ruiz Alvarez
9f1a774c67 Determine guest mode status for metrics collection
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>
2011-05-26 13:32:41 -07:00
Arkaitz Ruiz Alvarez
4fdcf19a62 Determine guest mode status for metrics collection
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>
2011-05-25 17:19:04 -07:00
Darin Petkov
8d3305eb92 libmetrics: Support partial writes.
BUG=chromium-os:11125
TEST=unit tests, tested on device

Change-Id: If9066988b86f61cb5bae413b7250d5426854f31b

Review URL: http://codereview.chromium.org/6592019
2011-02-25 14:19:30 -08:00
Darin Petkov
8842c8c42d libmetrics -- release the shared file lock when closing, handle EINTR.
BUG=chromium-os:11125
TEST=unit tests, tested on device

Change-Id: I126af62f77e4fd0f098d441038f8dc94c0020ac2

Review URL: http://codereview.chromium.org/6576048
2011-02-24 12:48:30 -08:00
Ken Mixter
be2e13b32b metrics: Send ability to notify chrome of system crashes
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
2011-01-22 06:15:56 -08:00
Darin Petkov
ed82485c3b Add support for user actions to the metrics library and the metrics clients.
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
2011-01-06 10:51:47 -08:00
Ken Mixter
eafbbdf3df metrics: Add guest mode detection to metrics library and client
Change-Id: I2c27bd999330395ba3568820ea76198b202bd7f4

BUG=7203
TEST=Verify metrics_client -c and -g toggling consent and guest mode.

Review URL: http://codereview.chromium.org/3571009
2010-10-01 15:38:42 -07:00
Ken Mixter
4c5daa4794 Add weekly crash counters, refactor metrics_daemon, respect opt-in in library.
BUG=5340,5814

Change-Id: I2c207055f1ebe48051193395e2dbe38d9140b025

Review URL: http://codereview.chromium.org/3171023
2010-08-26 18:35:06 -07:00
David James
3b3add5ad2 Cleanup style nits in metrics daemon.
- 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
2010-06-04 15:01:19 -07:00
Darin Petkov
11b8eb3cf1 Add metrics library tests. Some metrics daemon API cleanup.
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
2010-05-18 11:00:59 -07:00
Darin Petkov
21cd2c5a9f Remove the deprecated static metrics APIs.
Review URL: http://codereview.chromium.org/2037011
2010-05-12 15:26:16 -07:00
Darin Petkov
fc91b42a5e Start transition the metrics library to non-static API. Use gmock in tests.
Review URL: http://codereview.chromium.org/2049007
2010-05-12 13:05:45 -07:00
Darin Petkov
5b7dce1f60 Add support for linear/enumeration histograms.
Review URL: http://codereview.chromium.org/1747008
2010-04-21 15:45:10 -07:00
Darin Petkov
c2526a1265 Update the libmetrics API to match the new Chrome interface.
Review URL: http://codereview.chromium.org/1642018
2010-04-21 14:24:04 -07:00
Darin Petkov
4fcb2ac28f metrics cleanup and fixes.
- 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
2010-04-15 16:40:23 -07:00
Darin Petkov
65b0146839 Unify metrics_collection and metrics_daemon into metrics.
Tested new binaries on the target.
Tested incremental build.
Tested arm-generic build.

Review URL: http://codereview.chromium.org/1650006
2010-04-14 13:32:20 -07:00