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>
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>
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>
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>
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>
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>
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>
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>
Change-Id: Ief779a5bdc68b8e5bf2f1ed979bf30b50aca8e0f
BUG=chromium-os:13747
TEST=verify that Platform.Meminfo* entries are in about:histograms.
Review URL: http://codereview.chromium.org/6804014
Change-Id: Id30f4b7e5d121f2632592ebacf47a18ea1d89fec
BUG=chromium-os:12171
TEST=ran on target and observed that stats are generated
Review URL: http://codereview.chromium.org/6486021
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
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
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
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
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
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
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
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