Commit graph

51 commits

Author SHA1 Message Date
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
Luigi Semenzato
c88e42dea9 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
2011-02-17 10:21:16 -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
Daniel Erat
6c35d7c1b6 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
2011-01-21 11:25:45 -08:00
Daniel Erat
ca90d8b40b 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
2011-01-06 15:46:00 -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
Daniel Erat
b9b05e6047 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
2010-11-09 12:18:51 -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
Darin Petkov
fd55798dc0 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
2010-10-01 15:11:44 -07:00
Chris Sosa
dd6a8db06e Remove blank tracking script.
Change-Id: Iffe8e4233a3f7c100d44502baffdc9515cbdf426

BUG=5905
TEST=Emerged metrics package

Review URL: http://codereview.chromium.org/3597004
2010-09-30 16:39:32 -07:00
Ken Mixter
e4fb0af5c5 Deprecate libcrash.a
Change-Id: Ic8dd69478bcc32908c47ed38f61534fefb8e053d

BUG=5870
TEST=build_packages

Review URL: http://codereview.chromium.org/3413005
2010-09-14 18:09:20 -07:00
Sam Leffler
239b826808 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
2010-08-30 08:56:58 -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
Ken Mixter
ccd84c03d2 Add # daily crashes metrics and separate kernel crashes out.
BUG=5340

Review URL: http://codereview.chromium.org/3181015
2010-08-16 19:57:13 -07:00
Chris Masone
3fd74748a7 [metrics] Fix tests after libbase roll broke them
Change-Id: Ie26189e05b8aaa637614ed098d8b215c6a436216

Review URL: http://codereview.chromium.org/3138013
2010-08-12 12:19:25 -07:00
J. Richard Barnette
9ce4fa3f60 Add LICENSE file 2010-08-05 14:13:48 -07:00
Darin Petkov
6c0260a1bd 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
2010-07-19 10:54:27 -07:00
Chris Sosa
07ae1f87ca 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
2010-07-13 16:14:27 -07:00
Darin Petkov
1c2b4c8125 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
2010-06-30 10:30:27 -07:00
Darin Petkov
d2f284bfe2 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
2010-06-30 09:47:16 -07:00
Darin Petkov
38d5cb09ef 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
2010-06-24 12:10:26 -07:00
Darin Petkov
cd8c317453 Readability review.
Review URL: http://codereview.chromium.org/2729018
2010-06-24 10:13:54 -07:00
Darin Petkov
c2bf95fd8b Update libmetrics docs to cover some recent questions and issues.
Review URL: http://codereview.chromium.org/2828017
2010-06-21 16:27:52 -07:00
Darin Petkov
32e1df9d6c Update the README to mention that a C API is also available.
Review URL: http://codereview.chromium.org/2819008
2010-06-17 17:05:06 -07:00
Sam Leffler
10b301da57 add C wrapper for libmetrics
TEST=unit tests + build&test crosmetrics plugin for flimflam

Review URL: http://codereview.chromium.org/2832008
2010-06-17 14:22:43 -07:00
Darin Petkov
1bb904ed4d 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
2010-06-16 15:58:06 -07:00
Darin Petkov
f1e85e49b3 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
2010-06-10 15:59:53 -07:00
Darin Petkov
99c64a0dd8 Recommend including "Chrome OS" in the histogram description.
Review URL: http://codereview.chromium.org/2715005
2010-06-10 15:46:39 -07:00
Benson Leung
53faeb0d6c 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
2010-06-08 15:59:13 -07:00
Anush Elangovan
3fec7f67e4 Update Watchlists
Change-Id: If8849909b7641df022f32726d3ca2b31ad828fe0
2010-06-08 01:33:22 -07:00
David James
6bf6e2530d 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
2010-06-06 18:52:40 -07:00
Anush Elangovan
55188f5f9f Setup code review inheritance
Change-Id: I068e0f67cb89140526cc4df6f868d0d74b9c1bee
2010-06-05 13:12:30 -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
e334840fb3 s/org.moblin.connman/org.chromium.flimflam/
Review URL: http://codereview.chromium.org/2664003
2010-06-04 14:07:41 -07:00
Darin Petkov
f27f036d31 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
2010-06-04 13:14:19 -07:00
Chris Sosa
f1172ff67e Add script to collect logs, dumps and other relevant information.
Review URL: http://codereview.chromium.org/2103005
2010-05-27 14:17:38 -07:00
Darin Petkov
51a83dbe1f 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
2010-05-26 15:37:25 -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
c80dd92f5d 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
2010-05-14 09:12:36 -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
4fd6d3f1d0 First draft of the metrics doc.
Review URL: http://codereview.chromium.org/1989004
2010-05-11 09:47:43 -07:00
Darin Petkov
e579d66a36 Add tests for the D-Bus MessageFilter.
Review URL: http://codereview.chromium.org/1990001
2010-05-05 16:19:39 -07:00
Darin Petkov
2ccef01626 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
2010-05-05 16:06:37 -07:00
Darin Petkov
41e0623cab ... will look into some unit and integration testing for all metrics code next in a separate CL.
Review URL: http://codereview.chromium.org/1863002
2010-05-03 16:45:37 -07:00
Darin Petkov
703ec97bdf 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
2010-04-27 11:02:18 -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