Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/platform/metrics/README

Issue 2087002: Per kmixter's suggestion, install metrics headers under /usr/include/metrics. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/platform/metrics/Makefile ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 Use of this source code is governed by a BSD-style license that can be 2 Use of this source code is governed by a BSD-style license that can be
3 found in the LICENSE file. 3 found in the LICENSE file.
4 4
5 The Chrome OS "metrics" package contains utilities for client-side 5 The Chrome OS "metrics" package contains utilities for client-side
6 user metric collection. The collected data is sent to Chrome for 6 user metric collection. The collected data is sent to Chrome for
7 transport to the UMA server. 7 transport to the UMA server.
8 8
9 9
10 ================================================================================ 10 ================================================================================
(...skipping 10 matching lines...) Expand all
21 - Add a dependence (DEPEND and RDEPEND) on chromeos-base/metrics to 21 - Add a dependence (DEPEND and RDEPEND) on chromeos-base/metrics to
22 the module's ebuild. 22 the module's ebuild.
23 23
24 - Link the module with libmetrics (for example, by passing -lmetrics 24 - Link the module with libmetrics (for example, by passing -lmetrics
25 to the module's link command). Both libmetrics.so and libmetrics.a 25 to the module's link command). Both libmetrics.so and libmetrics.a
26 are built and installed under $SYSROOT/usr/lib/. Note that by 26 are built and installed under $SYSROOT/usr/lib/. Note that by
27 default -lmetrics will link against libmetrics.so, which is 27 default -lmetrics will link against libmetrics.so, which is
28 preferred. 28 preferred.
29 29
30 - To access the metrics library API in the module, include the 30 - To access the metrics library API in the module, include the
31 <metrics_library.h> header file. The file is installed in 31 <metrics/metrics_library.h> header file. The file is installed in
32 $SYSROOT/usr/include/ when the metrics library is built and 32 $SYSROOT/usr/include/ when the metrics library is built and
33 installed. 33 installed.
34 34
35 - The API includes two methods: 35 - The API includes two methods:
36 36
37 bool MetricsLibrary::SendToUMA(const std::string& name, int sample, 37 bool MetricsLibrary::SendToUMA(const std::string& name, int sample,
38 int min, int max, int nbuckets) 38 int min, int max, int nbuckets)
39 sends a sample for a regular (exponential) histogram. 39 sends a sample for a regular (exponential) histogram.
40 40
41 bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, 41 bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 screen saver states to determine if the user is actively using the 106 screen saver states to determine if the user is actively using the
107 device or not and generates the corresponding data. The metrics daemon 107 device or not and generates the corresponding data. The metrics daemon
108 uses libmetrics to send the data to Chrome. 108 uses libmetrics to send the data to Chrome.
109 109
110 The recommended way to generate metrics data from a module is to link 110 The recommended way to generate metrics data from a module is to link
111 and use libmetrics directly. However, the module could instead send 111 and use libmetrics directly. However, the module could instead send
112 signals to or communicate in some alternative way with the metrics 112 signals to or communicate in some alternative way with the metrics
113 daemon. Then the metrics daemon needs to monitor for the relevant 113 daemon. Then the metrics daemon needs to monitor for the relevant
114 events and take appropriate action -- for example, aggregate data and 114 events and take appropriate action -- for example, aggregate data and
115 send the histogram samples. 115 send the histogram samples.
OLDNEW
« no previous file with comments | « src/platform/metrics/Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698