chromiumos/platform/metrics.git
13 months agoAdded cros event name for attestation metric. 95/63495/2 master release-R30-4537.B stabilize-4512.B
Darren Krahn [Fri, 26 Jul 2013 20:37:20 +0000 (13:37 -0700)]
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>

13 months agoAdd additional stats for swapping from /proc/vmstat 62/64162/3
Sonny Rao [Thu, 1 Aug 2013 06:18:31 +0000 (23:18 -0700)]
Add additional stats for swapping from /proc/vmstat

This adds swap-in and swap-out rate calculation on the same intervals
as major page fault collection.

BUG=chromium:261965
TEST=observe Platform.SwapIn{Long,Short} and
Platform.SwapOut{Long,Short} appear in histograms

Change-Id: Ifcdba1088cdff355b8e132145ac79635b185663b
Reviewed-on: https://gerrit.chromium.org/gerrit/64162
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
14 months agoDefine cros event names for chaps database failures. 98/62698/2 factory-4455.B factory-pit-4471.B firmware-pit-4482.B stabilize-4443.B
Darren Krahn [Fri, 19 Jul 2013 21:09:50 +0000 (14:09 -0700)]
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>
14 months agoRemove unnecessary call to the deprecated g_thread_init(). 83/59683/2 factory-pit-4390.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B release-R29-4319.B
Ben Chan [Sat, 22 Jun 2013 13:29:36 +0000 (06:29 -0700)]
Remove unnecessary call to the deprecated g_thread_init().

g_thread_init() has been deprecated since glib 2.32. This CL removes the
unnecessary call to g_thread_init(), so that we can later migrate to
glib 2.34. It also replaces dbus_g_thread_init(), which calls the
deprecated g_thread_supported(), with dbus_threads_init_default()
directly.

BUG=chromium:253025
TEST=Tested the following:
1. Build and run unit tests.
2. chrome://histograms shows that CrOS metrics are being collected.

Change-Id: I9c191d1926928caa8a704db03024f48f6c1cb383
Reviewed-on: https://gerrit.chromium.org/gerrit/59683
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

15 months agoFix wrong sysfs pathname. 01/57501/2 factory-4290.B factory-pit-4280.B factory-spring-4262.B stabilize-4255.B stabilize-4287.B
Luigi Semenzato [Tue, 4 Jun 2013 20:24:21 +0000 (13:24 -0700)]
Fix wrong sysfs pathname.

This bug was introduced while adding test code
which was supposed to improve the reliability
of this program.

BUG=chromium:238890
TEST=verified that about:histograms contains samples

Change-Id: I66323292f9261f5715760d7c884f91aca1f7e453
Reviewed-on: https://gerrit.chromium.org/gerrit/57501
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>

15 months agometrics: Creates |Pause| and |Resume| methods for timers. 49/56849/5
repo sync [Tue, 28 May 2013 21:19:53 +0000 (14:19 -0700)]
metrics: Creates |Pause| and |Resume| methods for timers.

BUG=chromium:244589
TEST=unittest

Change-Id: I54e6dd7f5a8eb08ff42b1ee0e60df5cc895d0819
Reviewed-on: https://gerrit.chromium.org/gerrit/56849
Reviewed-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>

16 months agometrics: fix clang syntax checking error. 99/50999/2 factory-4128.B factory-spring-4131.B
Yunlian Jiang [Mon, 13 May 2013 17:31:45 +0000 (10:31 -0700)]
metrics: fix clang syntax checking error.

This fixes the two errors in the clang syntax.

BUG=chromium:240325
TEST=FEATURES="test" emerge-lumpy metrics

Change-Id: I57ab09fbd3dba2b394c606a3b2ba1ad799607939
Reviewed-on: https://gerrit.chromium.org/gerrit/50999
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
16 months agoCollect CPU frequency thermal throttling stats 87/50387/8
Luigi Semenzato [Tue, 7 May 2013 23:55:00 +0000 (16:55 -0700)]
Collect CPU frequency thermal throttling stats

This collects the max frequency every 30s and reports
it as a percentage of the unthrottled frequency.
The special value of 101% indicates that the CPU is
using turbo.

BUG=chromium:238890
TEST=ran manually, checked about:histograms

Change-Id: Ia1c8a2344b81b8274f9045b854d2e6d35cf49339
Reviewed-on: https://gerrit.chromium.org/gerrit/50387
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
16 months agoAdd metrics GYP file 16/40316/10
Liam McLoughlin [Wed, 2 Jan 2013 03:32:25 +0000 (22:32 -0500)]
Add metrics GYP file

BUG=chromium:220003
TEST=Run emerge-<board> -v platform2 with and without platform2 USE
flag on a range of boards plus the host

Change-Id: I44f15c31a8ac3917f3262912c43419a93652c0d8
Reviewed-on: https://gerrit.chromium.org/gerrit/40316
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Liam McLoughlin <lmcloughlin@chromium.org>

16 months agoAdd sparse histograms to the metrics library and metrics client. 97/45897/4 release-R28-4100.B stabilize-4100.38.B toolchainB
Luigi Semenzato [Tue, 19 Mar 2013 22:02:42 +0000 (15:02 -0700)]
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>
16 months agometrics: Listen to session manager for screen lock/unlock signals. 68/49468/3
Darin Petkov [Mon, 29 Apr 2013 13:07:31 +0000 (15:07 +0200)]
metrics: Listen to session manager for screen lock/unlock signals.

This should fix a pretty broken DailyUseTime metric. Also, use
contstants from service_constants.h where available.

BUG=chromium:216382,chromium:234799
TEST=unit tests; stop metrics_daemon on the device, then ran metrics_daemon
--nodaemon and inspected console log output while logging in/out as well as on
suspend/resume.
CQ-DEPEND=Ibfcc54c8dbf145cccd5ef871c7c9701b8312eb9e

Change-Id: I69ca0ea9594a496453f0933147ec66b0fa334718
Reviewed-on: https://gerrit.chromium.org/gerrit/49468
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Darin Petkov <petkov@chromium.org>

17 months agometrics: Add Cras.NoCodecsFoundAtBoot event to CrosEvents 98/46998/3 stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B
Chih-Chung Chang [Mon, 1 Apr 2013 06:27:39 +0000 (14:27 +0800)]
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>

17 months agometrics: add HwWatchdogReboot to CrosEvents 93/46593/3
Grant Grundler [Wed, 27 Mar 2013 00:13:49 +0000 (17:13 -0700)]
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>
17 months agometrics: Fixes a comment for |TimerReporter::ReportMilliseconds|. 37/46337/2 release-R27-3912.B stabilize-3912.79.B toolchainA
repo sync [Sat, 23 Mar 2013 00:21:57 +0000 (17:21 -0700)]
metrics: Fixes a comment for |TimerReporter::ReportMilliseconds|.

It turns out that |TimerReporter::ReportMilliseconds| does report a value
for a timer that hasn't been started (in shill,
|Metrics::NotifyDevice*Finished| calls |Stop| immediately before
|ReportMilliseconds| and it works just fine.  This is perfectly OK, it's
just that the comment didn't reflect this.  This CL fixes that.

BUG=None.
TEST=None.

Change-Id: I578d554106acdb92957bfe0197622a1054cfa9c9
Reviewed-on: https://gerrit.chromium.org/gerrit/46337
Reviewed-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>

18 months agoAdd generic "event of interest" enumerated histogram. 22/45322/5 factory-spring-3842.B stabilize-3881.0.B
Luigi Semenzato [Wed, 13 Mar 2013 17:53:55 +0000 (10:53 -0700)]
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>
19 months ago[metrics] Update metrics to build against libchrome-180609 97/43297/2 firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B
Chris Masone [Thu, 14 Feb 2013 20:15:35 +0000 (12:15 -0800)]
[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>

19 months agoModify swap metrics to be more useful. 23/43123/3
Luigi Semenzato [Tue, 12 Feb 2013 21:17:07 +0000 (13:17 -0800)]
Modify swap metrics to be more useful.

We need to record the amount of swap used, and correlate it
with the total amount of swap.

The metrics added are Platform.MeminfoSwapUsed and
Platform.MeminfoSwapUsedPercent.

BUG=chromium-os:38583
TEST=not really
BRANCH=none

Change-Id: Iaf26c917e3c4d23f3f58f436047f8dd165177960
Reviewed-on: https://gerrit.chromium.org/gerrit/43123
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>

19 months agoAdd meminfo swap metrics. 98/42598/5 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-bluetooth-smart toolchain-3701.42.B
Luigi Semenzato [Tue, 5 Feb 2013 03:50:45 +0000 (19:50 -0800)]
Add meminfo swap metrics.

The current metrics don't show how much swap we're using at a given
time.  We only have indirect measures (page faults rate for instance).

We also need to add one type of histogram scale, since compressed swap
can exceed total RAM, and all current histograms are on a scale from
zero to total RAM.

BUG=chromium-os:38583
TEST=stared at the code really hard and compiled it
BRANCH=none

Change-Id: Icb9dce5efe5dbd78123aad51ffd369cb46721096
Reviewed-on: https://gerrit.chromium.org/gerrit/42598
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
19 months agoMake policy reloads explicit. 38/42538/2
Julian Pastarmov [Mon, 4 Feb 2013 16:58:14 +0000 (17:58 +0100)]
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>
2 years agoAdd missing gthread-2.0 linkage. factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B release-R23-2913.B stabilize stabilize-3428.110.0 stabilize-3658.0.0 stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize2 toolchain-3428.65.B
Ben Chan [Fri, 7 Sep 2012 05:28:47 +0000 (22:28 -0700)]
Add missing gthread-2.0 linkage.

gthread-2.0 linkage is required for g_thread_init when compiling with
glib 2.32.4.

BUG=chromium-os:34103
TEST=`emerge metrics` with glib 2.30.2 and 2.32.4

Change-Id: Id6ef58ee568989123fc563af47e2670066d01b93
Reviewed-on: https://gerrit.chromium.org/gerrit/32507
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoAdd unisdt.h to make gcc 4.7 compile it factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B firmware-butterfly-2788.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-stout-2817.B release-R20-2268.B release-R21-2465.B release-R22-2723.B
Yunlian Jiang [Wed, 2 May 2012 21:24:04 +0000 (14:24 -0700)]
Add unisdt.h to make gcc 4.7 compile it

BUG=None
TEST=compile passed

Change-Id: I3c52e0c7b60572058d277c05ea05471327149601
Reviewed-on: https://gerrit.chromium.org/gerrit/21672
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
2 years agoupdate to newer libbase, and allow setting via env
Mike Frysinger [Fri, 6 Apr 2012 20:34:09 +0000 (16:34 -0400)]
update to newer libbase, and allow setting via env

Other packages have this, and it makes managing the ebuild easier, so
let the env set the libbase version to use.

BUG=chromium-os:25872
TEST=`emerge-x86-alex metrics` works
TEST=`cros_run_unit_tests --board=x86-alex -p metrics` pass
TEST=build_images+build_packages for x86-alex boots up

Change-Id: I2f417a13f8220d653aa2bcf6c89f519fb4f2e3df
Reviewed-on: https://gerrit.chromium.org/gerrit/20198
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoclean up build & convert to SLOT-ed libbase factory-1987.B release-R19-2046.B
Mike Frysinger [Fri, 9 Mar 2012 15:59:56 +0000 (10:59 -0500)]
clean up build & convert to SLOT-ed libbase

This includes a couple of fixes:
 - use the right compiler flag names
 - execute pkg-config twice total, and not once per compile
 - build against SLOT-ed libbase
 - drop link info that was just for libbase as that handles
   things all by itself now without bothering external users

BUG=chromium-os:16623
TEST=`emerge-x86-alex metrics` still works
TEST=`cros_run_unit_tests --board x86-alex -p metrics` passes

Change-Id: I40b9216c9e2a1edef476f9369d524e6a4bf26012
Reviewed-on: https://gerrit.chromium.org/gerrit/17704
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoinclude base/stringprintf.h directly
Mike Frysinger [Wed, 7 Mar 2012 15:35:29 +0000 (10:35 -0500)]
include base/stringprintf.h directly

This code uses StringPrintf, but doesn't include the header.  Older
versions of libbase would implicitly include it, but newer ones do
not.  So include it ourselves to fix building with newer versions.

BUG=chromium-os:25872
TEST=`emerge-x86-alex metrics` works (with newer and older libbase)

Change-Id: I7859f67767958f70853a40e8df4a33a64b36d010
Reviewed-on: https://gerrit.chromium.org/gerrit/17487
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>

2 years agotouchup pkg-config/library handling
Mike Frysinger [Tue, 21 Feb 2012 18:15:09 +0000 (13:15 -0500)]
touchup pkg-config/library handling

Make sure we execute pkg-config twice in the ebuild and not once
per object compile/link.

Fix the order of libraries when linking libmetric -- we need them to
come after the objects, and we need to link in libbase since we use
symbols from it.  (Things happen to be working now because libpolicy
accidentally exports some symbols from libbase.)

BUG=chromium-os:26658
TEST=`emerge-x86-alex metrics` still works

Change-Id: Ic8381ce9cb3e8a6d81d45d613ac66fea8a12b669
Reviewed-on: https://gerrit.chromium.org/gerrit/16290
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agoUpdate metrics_library.h to find scoped_ptr.h in <base/memory>.
Eric Shienbrood [Wed, 29 Feb 2012 19:52:29 +0000 (14:52 -0500)]
Update metrics_library.h to find scoped_ptr.h in <base/memory>.

This is in preparation to the move to a newer libchrome, where
scoped_ptr.h no longer appears in base, just in base/memory.

BUG=chromium-os:16623
TEST=Do the emerge, and then examine /usr/include/metrics/metrics_library.h

Change-Id: I95cd9b52eee216316dd8ea21ecb84101d7a95edf
Reviewed-on: https://gerrit.chromium.org/gerrit/17073
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
2 years ago[metrics] use libchromeos.pc release-R18-1660.B
Elly Jones [Wed, 11 Jan 2012 22:27:01 +0000 (17:27 -0500)]
[metrics] use libchromeos.pc

BUG=chromium-os:24959
TEST=build

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14012
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 0ea8151d4628ccf500da82206384b8b492a95a0b)

Change-Id: I0c51d49cc7182a19b16d3cb123c43e29be890cbe
Reviewed-on: https://gerrit.chromium.org/gerrit/14505
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
2 years agoRevert "[metrics] use libchromeos.pc"
Scott James Remnant [Fri, 13 Jan 2012 01:58:52 +0000 (17:58 -0800)]
Revert "[metrics] use libchromeos.pc"

This reverts commit 6ed1d63d859c37e5a3290d4786862d46927aa5c2

Change-Id: If32cadcdb918f66c9cfada8809f2001122a35d69
Reviewed-on: https://gerrit.chromium.org/gerrit/14118
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2 years ago[metrics] use libchromeos.pc
Elly Jones [Wed, 11 Jan 2012 22:27:01 +0000 (17:27 -0500)]
[metrics] use libchromeos.pc

BUG=chromium-os:24959
TEST=build

Change-Id: I7038f5173c7b0949cbf88e6a9213d75e96ae142d
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14012
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 years agoSends metrics to Chrome even when user did not consent to send stats. factory-1235.B factory-1284.B factory-1412.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R17-1412.B
Luigi Semenzato [Fri, 14 Oct 2011 22:31:32 +0000 (15:31 -0700)]
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>
2 years agoAdd page fault statistics.
Luigi Semenzato [Fri, 14 Oct 2011 19:03:35 +0000 (12:03 -0700)]
Add page fault statistics.

BUG=chromium-os:20624
TEST=observe that Platform.PageFaultXXX appear in about:histograms.

Change-Id: Ifc281d31e05102dc4133d133f732b737e19891f1
Reviewed-on: http://gerrit.chromium.org/gerrit/10143
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
3 years agoFixed wrong method signatures in TimerReporterMock. factory-1020.B factory-980.B release-1011.B release-R16-1193.B test-982.B
Bruno Rocha [Thu, 18 Aug 2011 18:28:30 +0000 (11:28 -0700)]
Fixed wrong method signatures in TimerReporterMock.

TimerReporterMock had some wrong method signatures, and was lacking signatures
for its accessor methods.

BUG=chromium-os:18800
TEST=None

Change-Id: I08d832857c1ae3df907f5470433117f7a03fe125
Reviewed-on: http://gerrit.chromium.org/gerrit/6230
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Bruno Pontes Soares Rocha <bpontes@chromium.org>
Tested-by: Bruno Pontes Soares Rocha <bpontes@chromium.org>
3 years agoAdded a timer-based report to the metrics library.
Bruno Rocha [Tue, 2 Aug 2011 19:40:17 +0000 (12:40 -0700)]
Added a timer-based report to the metrics library.

Timer encapsulates a timer with basic functionality.
TimerReporter subclasses it for also sending UMA reports.

BUG=chromium-os:18800
TEST=Unit test 'timer_test' has been included

Change-Id: I9de9a2a7388721ba1476fe706a8d12788d2176ad
Reviewed-on: http://gerrit.chromium.org/gerrit/5161
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Bruno Pontes Soares Rocha <bpontes@google.com>
Reviewed-by: Bruno Pontes Soares Rocha <bpontes@google.com>
3 years agoFixed a test where a method was expected to be called but it wasn't. 0.15.877.B firmware-881-u-boot-v1 firmware-u-boot-v1
Julian Pastarmov [Thu, 4 Aug 2011 09:15:13 +0000 (11:15 +0200)]
Fixed a test where a method was expected to be called but it wasn't.

A recent optimization in the code made that second call unneeded as so
our expectation is not met anymore (for good so).

BUG=chromium-os:18430
TEST=Metrics unit tests should pass.

Change-Id: I1162dc657156ee9207b904ab544b0f151eec0453
Reviewed-on: http://gerrit.chromium.org/gerrit/5302
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Tested-by: Julian Pastarmov <pastarmovj@chromium.org>
3 years agoRespect the metrics file if no policy value is set (for legacy migration).
Julian Pastarmov [Tue, 2 Aug 2011 14:10:49 +0000 (16:10 +0200)]
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>
3 years agoRevert "Revert "Make the metrics library respect the policy settings instead of the...
Ken Mixter [Fri, 22 Jul 2011 21:59:51 +0000 (14:59 -0700)]
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>
3 years agoRevert "Make the metrics library respect the policy settings instead of the consent...
Julian Pastarmov [Fri, 22 Jul 2011 17:20:38 +0000 (10:20 -0700)]
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>
3 years agoMake the metrics library respect the policy settings instead of the consent file.
Julian Pastarmov [Fri, 22 Jul 2011 15:57:55 +0000 (08:57 -0700)]
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>
3 years agoRevert "Make the metrics library respect the policy settings instead of the consent...
Ken Mixter [Thu, 21 Jul 2011 21:33:54 +0000 (14:33 -0700)]
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>
3 years agoMake the metrics library respect the policy settings instead of the consent file.
Julian Pastarmov [Mon, 18 Jul 2011 15:41:17 +0000 (17:41 +0200)]
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>
3 years agoDetermine guest mode status for metrics collection 0.13.587.B 780.B
Arkaitz Ruiz Alvarez [Thu, 26 May 2011 19:22:22 +0000 (12:22 -0700)]
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>
3 years agoDetermine guest mode status for metrics collection
Arkaitz Ruiz Alvarez [Wed, 25 May 2011 21:41:11 +0000 (14:41 -0700)]
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>
3 years agoAdd memuse stats and fix disk I/O computations. 0.13.558.B
Luigi Semenzato [Tue, 17 May 2011 23:37:18 +0000 (16:37 -0700)]
Add memuse stats and fix disk I/O computations.

This changes adds memory usage stats after 1  5, 30, 150, and 750
minutes of active use (approximated by wall
clock time minus sleep time).  We log only the anonymous memory
usage (active + inactive) as we expect that other types of
allocations would not convey much additional information.

This also fixes the disk I/O computation to use actual active
time elapsed between callbacks, instead of assuming the expected
interval has elapsed.  The existing code causes errors in
both directions when a suspend/resume cycle occurs between callbacks.

BUG=14209
TEST=verify that about:histograms page contains Platform.MemuseAnon1 after 1 minute and Platform.MemuseAnon2 after 5 minutes.

Change-Id: Ib32d915fac7766a9fca7125105224889ea93050e
Reviewed-on: http://gerrit.chromium.org/gerrit/1132
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
3 years agoRemove obsolete hardware_class script.
Darin Petkov [Fri, 20 May 2011 22:49:59 +0000 (15:49 -0700)]
Remove obsolete hardware_class script.

BUG=chromium-os:15257
TEST=emerge-x86-mario metrics

Change-Id: I496121c47394dc81b7f414655940dddc8d5cc992
Reviewed-on: http://gerrit.chromium.org/gerrit/1314
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
3 years ago[metrics] Roll forward to new libchrome
Chris Masone [Thu, 12 May 2011 21:14:48 +0000 (14:14 -0700)]
[metrics] Roll forward to new libchrome

BUG=chromium-os:14304
TEST=build, unit tests

Change-Id: I92fd96b2c14df847efe47735c0f76d99023ec254
Reviewed-on: http://gerrit.chromium.org/gerrit/819
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
3 years agometrics: Fixed compile-time warnings due to unused variables. 0.13.509.B
Darin Petkov [Mon, 9 May 2011 23:33:19 +0000 (16:33 -0700)]
metrics: Fixed compile-time warnings due to unused variables.

BUG=chromium-os:15040
TEST=built with gcc-4.6

Change-Id: Idf95c986e1eda79be735eeb4ff7c79e9a7eede60
Reviewed-on: http://gerrit.chromium.org/gerrit/569
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
3 years agoAdd meminfo UMA collection. 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B
Luigi Semenzato [Tue, 12 Apr 2011 21:12:35 +0000 (14:12 -0700)]
Add meminfo UMA collection.

Change-Id: Ief779a5bdc68b8e5bf2f1ed979bf30b50aca8e0f

BUG=chromium-os:13747
TEST=verify that Platform.Meminfo* entries are in about:histograms.

Review URL: http://codereview.chromium.org/6804014

3 years agoFind device-dependent disk stats file, and skip disk stats if not available. 0.11.241.B 0.11.257.B 0.11.257.B90 0.12.362.B 0.12.369.B 0.12.392.B 11.1.241.B
Luigi Semenzato [Mon, 28 Feb 2011 19:17:43 +0000 (11:17 -0800)]
Find device-dependent disk stats file, and skip disk stats if not available.

Change-Id: I03afb85e3357dd4c2cf5effd98b194c71d77c71d

BUG=12171
TEST=unit tested

Review URL: http://codereview.chromium.org/6541007

3 years agolibmetrics: Support partial writes.
Darin Petkov [Fri, 25 Feb 2011 22:19:30 +0000 (14:19 -0800)]
libmetrics: Support partial writes.

BUG=chromium-os:11125
TEST=unit tests, tested on device

Change-Id: If9066988b86f61cb5bae413b7250d5426854f31b

Review URL: http://codereview.chromium.org/6592019

3 years agolibmetrics -- release the shared file lock when closing, handle EINTR.
Darin Petkov [Thu, 24 Feb 2011 20:48:30 +0000 (12:48 -0800)]
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

3 years agoCollect some disk statistics.
Luigi Semenzato [Thu, 17 Feb 2011 18:21:16 +0000 (10:21 -0800)]
Collect some disk statistics.

Change-Id: Id30f4b7e5d121f2632592ebacf47a18ea1d89fec

BUG=chromium-os:12171
TEST=ran on target and observed that stats are generated

Review URL: http://codereview.chromium.org/6486021

3 years agometrics: Send ability to notify chrome of system crashes
Ken Mixter [Sat, 22 Jan 2011 14:15:56 +0000 (06:15 -0800)]
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

3 years agometrics: Update comment about adding user actions.
Daniel Erat [Fri, 21 Jan 2011 19:25:45 +0000 (11:25 -0800)]
metrics: Update comment about adding user actions.

This points people at chrome/tools/extract_actions.py,
where new actions can be registered without needing to
modify C++ code (once http://codereview.chromium.org/6266011/
is committed).

Change-Id: If7ceaa38939ab9c1594aacd999e0ec86c4541d41

BUG=chromium-os:10696
TEST=none

Review URL: http://codereview.chromium.org/6320009

3 years agometrics: Add SendUserActionToUMA() to MetricsLibraryMock.
Daniel Erat [Thu, 6 Jan 2011 23:46:00 +0000 (15:46 -0800)]
metrics: Add SendUserActionToUMA() to MetricsLibraryMock.

The metrics daemon doesn't support sending user actions, but
I need this exposed through the mock library so I can use
SendUserActionToUMA() in the power manager.

Change-Id: Ie9e3995df9978768477fe46dcb9ebec4d1fff1d5

BUG=chromium-os:10696
TEST=built for x86-mario with FEATURES=test; checked that the power manager can now use SendUserActionToUMA()

Review URL: http://codereview.chromium.org/6130003

3 years agoAdd support for user actions to the metrics library and the metrics clients.
Darin Petkov [Thu, 6 Jan 2011 18:51:47 +0000 (10:51 -0800)]
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

3 years agometrics: Update tests to send user in session state change.
Daniel Erat [Tue, 9 Nov 2010 20:18:51 +0000 (12:18 -0800)]
metrics: Update tests to send user in session state change.

This updates the signal to match the changes that I'm making
in http://codereview.chromium.org/4718001/show.

Change-Id: Id414187a62f209f2e8145c75bfd982b357d04e98

BUG=chromium-os:8123
TEST=ran it

Review URL: http://codereview.chromium.org/4749001

3 years agometrics: Add guest mode detection to metrics library and client
Ken Mixter [Fri, 1 Oct 2010 22:38:42 +0000 (15:38 -0700)]
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

3 years agoMetrics: Update README to reflect recent changes.
Darin Petkov [Fri, 1 Oct 2010 22:11:44 +0000 (15:11 -0700)]
Metrics: Update README to reflect recent changes.

The updates include:

- Mention the need for "Consent To Send Stats" to exists and the new
AreMetricsEnabled API.

- Replace wiki with XML references (need to add an internal only document
somewhere too).

- Reformat to take full advantage of 80-character lines.

BUG=none
TEST=none

Change-Id: Idbe06e70d5d15f1f8dbbb9475f38a1b0becbca32

Review URL: http://codereview.chromium.org/3573007

3 years agoRemove blank tracking script.
Chris Sosa [Thu, 30 Sep 2010 23:39:32 +0000 (16:39 -0700)]
Remove blank tracking script.

Change-Id: Iffe8e4233a3f7c100d44502baffdc9515cbdf426

BUG=5905
TEST=Emerged metrics package

Review URL: http://codereview.chromium.org/3597004

4 years agoDeprecate libcrash.a
Ken Mixter [Wed, 15 Sep 2010 01:09:20 +0000 (18:09 -0700)]
Deprecate libcrash.a

Change-Id: Ic8dd69478bcc32908c47ed38f61534fefb8e053d

BUG=5870
TEST=build_packages

Review URL: http://codereview.chromium.org/3413005

4 years agoremove TimeToDrop support
Sam Leffler [Mon, 30 Aug 2010 15:56:58 +0000 (08:56 -0700)]
remove TimeToDrop support

Now that flimflam has native support this can be purged.

TEST=run FEATURES=test emerge-x86-generic metrics; verify TimeToDrop is still being recorded w/ about:histograms/Network

Review URL: http://codereview.chromium.org/3233004

4 years agoAdd weekly crash counters, refactor metrics_daemon, respect opt-in in library.
Ken Mixter [Fri, 27 Aug 2010 01:35:06 +0000 (18:35 -0700)]
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

4 years agoAdd # daily crashes metrics and separate kernel crashes out.
Ken Mixter [Tue, 17 Aug 2010 02:57:13 +0000 (19:57 -0700)]
Add # daily crashes metrics and separate kernel crashes out.

BUG=5340

Review URL: http://codereview.chromium.org/3181015

4 years ago[metrics] Fix tests after libbase roll broke them
Chris Masone [Thu, 12 Aug 2010 19:19:25 +0000 (12:19 -0700)]
[metrics] Fix tests after libbase roll broke them

Change-Id: Ie26189e05b8aaa637614ed098d8b215c6a436216

Review URL: http://codereview.chromium.org/3138013

4 years agoAdd LICENSE file
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoLink libcrash conditionally.
Darin Petkov [Mon, 19 Jul 2010 17:54:27 +0000 (10:54 -0700)]
Link libcrash conditionally.

This enables building metrics for the host thus enabling using metrics
in the current update_engine without breaking the host dev flow.

BUG=4852
TEST=emerged with and without USE=-crash

Review URL: http://codereview.chromium.org/3032004

4 years agoRemove generate_logs since it's been moved to workarounds in issue 2861045
Chris Sosa [Tue, 13 Jul 2010 23:14:27 +0000 (16:14 -0700)]
Remove generate_logs since it's been moved to workarounds in issue 2861045

TEST=Emerged metrics and workarounds after change.

Review URL: http://codereview.chromium.org/2978006

4 years agoUse the HWID from the firmware as the hardware class, if available.
Darin Petkov [Wed, 30 Jun 2010 17:30:27 +0000 (10:30 -0700)]
Use the HWID from the firmware as the hardware class, if available.

BUG=3089
TEST=gmerge'd on device, ran with and without an hwid file.

Review URL: http://codereview.chromium.org/2824039

4 years agoAdd crash reporting to metrics_daemon.
Darin Petkov [Wed, 30 Jun 2010 16:47:16 +0000 (09:47 -0700)]
Add crash reporting to metrics_daemon.

BUG=none
TEST=unit tests,gmerge'd on device, verified it runs OK, pkill -SEGV generated minidump.

Review URL: http://codereview.chromium.org/2806043

4 years agoLog active use time between kernel crashes.
Darin Petkov [Thu, 24 Jun 2010 19:10:26 +0000 (12:10 -0700)]
Log active use time between kernel crashes.

Also, initialize the network state from flimflam, just in case -- now
that the metrics daemon process starts a bit late,

BUG=none
TEST=unit tests, ran on the device, emerged arm-generic

Review URL: http://codereview.chromium.org/2864009

4 years agoReadability review.
Darin Petkov [Thu, 24 Jun 2010 17:13:54 +0000 (10:13 -0700)]
Readability review.

Review URL: http://codereview.chromium.org/2729018

4 years agoUpdate libmetrics docs to cover some recent questions and issues.
Darin Petkov [Mon, 21 Jun 2010 23:27:52 +0000 (16:27 -0700)]
Update libmetrics docs to cover some recent questions and issues.

Review URL: http://codereview.chromium.org/2828017

4 years agoUpdate the README to mention that a C API is also available.
Darin Petkov [Fri, 18 Jun 2010 00:05:06 +0000 (17:05 -0700)]
Update the README to mention that a C API is also available.

Review URL: http://codereview.chromium.org/2819008

4 years agoadd C wrapper for libmetrics
Sam Leffler [Thu, 17 Jun 2010 21:22:43 +0000 (14:22 -0700)]
add C wrapper for libmetrics

TEST=unit tests + build&test crosmetrics plugin for flimflam

Review URL: http://codereview.chromium.org/2832008

4 years agoMeasure and report time between user-space process crashes.
Darin Petkov [Wed, 16 Jun 2010 22:58:06 +0000 (15:58 -0700)]
Measure and report time between user-space process crashes.

BUG=none
TEST=unit tests, gmerged on the device and inspected
logs, about:histograms,etc.

Review URL: http://codereview.chromium.org/2736008

4 years agoImplement a persistent storage aggregation counter class.
Darin Petkov [Thu, 10 Jun 2010 22:59:53 +0000 (15:59 -0700)]
Implement a persistent storage aggregation counter class.

This class is currently used to aggregate the active daily use time
but can also be used to aggregate other data (e.g., active use time
between crashes) before sending to UMA. Abstracting this in a separate
class also simplifies the daemon unit tests.

An alternative design would store the data on shutdown (but may slow
down shutdown a little). This should do it for now.

BUG=none
TEST=gmerged on device,inspected logs,about:histograms,etc.

Review URL: http://codereview.chromium.org/2731008

4 years agoRecommend including "Chrome OS" in the histogram description.
Darin Petkov [Thu, 10 Jun 2010 22:46:39 +0000 (15:46 -0700)]
Recommend including "Chrome OS" in the histogram description.

Review URL: http://codereview.chromium.org/2715005

4 years agoFixed KDBusMatches bug.
Benson Leung [Tue, 8 Jun 2010 22:59:13 +0000 (15:59 -0700)]
Fixed KDBusMatches bug.

Missing comma in array definition caused metrics_daemon to fail.
Metrics_daemon would use a lot of CPU when broken.

Review URL: http://codereview.chromium.org/2767003

4 years agoUpdate Watchlists
Anush Elangovan [Tue, 8 Jun 2010 08:33:22 +0000 (01:33 -0700)]
Update Watchlists

Change-Id: If8849909b7641df022f32726d3ca2b31ad828fe0

4 years agoUpdate metrics daemon to use new power manager signals for locking (4 of 7).
David James [Mon, 7 Jun 2010 01:52:40 +0000 (18:52 -0700)]
Update metrics daemon to use new power manager signals for locking (4 of 7).

Co-dependent with the following change:
 - Issue 2685003: Update XScreenSaver to use new power manager signals for
   locking (3 of 7).

TEST=Ran test suite.
BUG=chromium-os:3694

Review URL: http://codereview.chromium.org/2698002

4 years agoSetup code review inheritance
Anush Elangovan [Sat, 5 Jun 2010 20:12:30 +0000 (13:12 -0700)]
Setup code review inheritance

Change-Id: I068e0f67cb89140526cc4df6f868d0d74b9c1bee

4 years agoCleanup style nits in metrics daemon.
David James [Fri, 4 Jun 2010 22:01:19 +0000 (15:01 -0700)]
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

4 years agos/org.moblin.connman/org.chromium.flimflam/
Darin Petkov [Fri, 4 Jun 2010 21:07:41 +0000 (14:07 -0700)]
s/org.moblin.connman/org.chromium.flimflam/

Review URL: http://codereview.chromium.org/2664003

4 years agoUpdate metrics_daemon to use base/time.h instead of time_t directly.
Darin Petkov [Fri, 4 Jun 2010 20:14:19 +0000 (13:14 -0700)]
Update metrics_daemon to use base/time.h instead of time_t directly.

Also, guard against time jumps in the active daily use metric collection.

BUG=none
TEST=unit tests; gmerge'd on the target device and inspected the logs.

Review URL: http://codereview.chromium.org/2576005

4 years agoAdd script to collect logs, dumps and other relevant information.
Chris Sosa [Thu, 27 May 2010 21:17:38 +0000 (14:17 -0700)]
Add script to collect logs, dumps and other relevant information.

Review URL: http://codereview.chromium.org/2103005

4 years agoA script to print the hardware class (e.g., hwqual ID) of the device.
Darin Petkov [Wed, 26 May 2010 22:37:25 +0000 (15:37 -0700)]
A script to print the hardware class (e.g., hwqual ID) of the device.

This script will be used be Chrome's UMA service to add the "hardwareclass"
field to the XML to be uploaded.

Review URL: http://codereview.chromium.org/2289001

4 years agoAdd metrics library tests. Some metrics daemon API cleanup.
Darin Petkov [Tue, 18 May 2010 18:00:59 +0000 (11:00 -0700)]
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

4 years agoPer kmixter's suggestion, install metrics headers under /usr/include/metrics.
Darin Petkov [Fri, 14 May 2010 16:12:36 +0000 (09:12 -0700)]
Per kmixter's suggestion, install metrics headers under /usr/include/metrics.

Also, move file installation to the metrics ebuild.

Review URL: http://codereview.chromium.org/2087002

4 years agoRemove the deprecated static metrics APIs.
Darin Petkov [Wed, 12 May 2010 22:26:16 +0000 (15:26 -0700)]
Remove the deprecated static metrics APIs.

Review URL: http://codereview.chromium.org/2037011

4 years agoStart transition the metrics library to non-static API. Use gmock in tests.
Darin Petkov [Wed, 12 May 2010 20:05:45 +0000 (13:05 -0700)]
Start transition the metrics library to non-static API. Use gmock in tests.

Review URL: http://codereview.chromium.org/2049007

4 years agoFirst draft of the metrics doc.
Darin Petkov [Tue, 11 May 2010 16:47:43 +0000 (09:47 -0700)]
First draft of the metrics doc.

Review URL: http://codereview.chromium.org/1989004

4 years agoAdd tests for the D-Bus MessageFilter.
Darin Petkov [Wed, 5 May 2010 23:19:39 +0000 (16:19 -0700)]
Add tests for the D-Bus MessageFilter.

Review URL: http://codereview.chromium.org/1990001

4 years agoAdd some basic tests for metrics_daemon.
Darin Petkov [Wed, 5 May 2010 23:06:37 +0000 (16:06 -0700)]
Add some basic tests for metrics_daemon.

A separate CL adds a test stanza to the metrics ebuild. More tests
(specifically, for the D-Bus MessageFilter) will also come in a
separate CL.

Review URL: http://codereview.chromium.org/1919005

4 years ago... will look into some unit and integration testing for all metrics code next in...
Darin Petkov [Mon, 3 May 2010 23:45:37 +0000 (16:45 -0700)]
... will look into some unit and integration testing for all metrics code next in a separate CL.

Review URL: http://codereview.chromium.org/1863002

4 years agoLog time between network drops -- from online to offline.
Darin Petkov [Tue, 27 Apr 2010 18:02:18 +0000 (11:02 -0700)]
Log time between network drops -- from online to offline.

Rewrite most of metrics_daemon. Convert to low-level D-Bus API -- this
simplifies the code a little and also allows us to catch the power
state signal. I still suspect we may be abusing D-Bus a little but it
seems to work.

snanda@ -- please review the power state code specifically.

BUG=none
TEST=tested on target platform and arm-generic builds

Review URL: http://codereview.chromium.org/1799001

4 years agoAdd support for linear/enumeration histograms.
Darin Petkov [Wed, 21 Apr 2010 22:45:10 +0000 (15:45 -0700)]
Add support for linear/enumeration histograms.

Review URL: http://codereview.chromium.org/1747008

4 years agoUpdate the libmetrics API to match the new Chrome interface.
Darin Petkov [Wed, 21 Apr 2010 21:24:04 +0000 (14:24 -0700)]
Update the libmetrics API to match the new Chrome interface.

Review URL: http://codereview.chromium.org/1642018

4 years agometrics cleanup and fixes.
Darin Petkov [Thu, 15 Apr 2010 23:40:23 +0000 (16:40 -0700)]
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

4 years agoUnify metrics_collection and metrics_daemon into metrics.
Darin Petkov [Wed, 14 Apr 2010 20:32:20 +0000 (13:32 -0700)]
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