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>
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>
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>
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>
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>
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>
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>
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>
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