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

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

Issue 2037011: Remove the deprecated static metrics APIs. (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
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 24 matching lines...) Expand all
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,
42 int max) 42 int max)
43 sends a sample for an enumeration (linear) histogram. 43 sends a sample for an enumeration (linear) histogram.
44 44
45 Currently, the API also includes two deprecated static methods: 45 Before using these methods, a MetricsLibrary object needs to be
46 46 constructed and initialized through its Init method. See the
47 bool MetricsLibrary::SendToChrome(const std::string& name, int sample, 47 complete API documentation in metrics_library.h under
48 int min, int max, int nbuckets)
49 bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample,
50 int max)
51
52 See the API documentation in metrics_library.h under
53 src/platform/metrics/. 48 src/platform/metrics/.
54 49
55 - On the target platform, shortly after the sample is sent it should 50 - On the target platform, shortly after the sample is sent it should
56 be visible in Chrome through "about:histograms". 51 be visible in Chrome through "about:histograms".
57 52
58 53
59 ================================================================================ 54 ================================================================================
60 Histogram Naming Convention 55 Histogram Naming Convention
61 ================================================================================ 56 ================================================================================
62 57
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 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
112 device or not and generates the corresponding data. The metrics daemon 107 device or not and generates the corresponding data. The metrics daemon
113 uses libmetrics to send the data to Chrome. 108 uses libmetrics to send the data to Chrome.
114 109
115 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
116 and use libmetrics directly. However, the module could instead send 111 and use libmetrics directly. However, the module could instead send
117 signals to or communicate in some alternative way with the metrics 112 signals to or communicate in some alternative way with the metrics
118 daemon. Then the metrics daemon needs to monitor for the relevant 113 daemon. Then the metrics daemon needs to monitor for the relevant
119 events and take appropriate action -- for example, aggregate data and 114 events and take appropriate action -- for example, aggregate data and
120 send the histogram samples. 115 send the histogram samples.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698