Loading metrics/README +3 −8 Original line number Diff line number Diff line Loading @@ -42,14 +42,9 @@ a module, you need to do the following: int max) sends a sample for an enumeration (linear) histogram. Currently, the API also includes two deprecated static methods: bool MetricsLibrary::SendToChrome(const std::string& name, int sample, int min, int max, int nbuckets) bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, int max) See the API documentation in metrics_library.h under Before using these methods, a MetricsLibrary object needs to be constructed and initialized through its Init method. See the complete API documentation in metrics_library.h under src/platform/metrics/. - On the target platform, shortly after the sample is sent it should Loading metrics/metrics_client.cc +4 −2 Original line number Diff line number Diff line Loading @@ -78,14 +78,16 @@ int main(int argc, char** argv) { } if (send_to_chrome) { MetricsLibrary metrics_lib; metrics_lib.Init(); if (send_enum) { int max = atoi(argv[name_index + 2]); MetricsLibrary::SendEnumToChrome(name, sample, max); metrics_lib.SendEnumToUMA(name, sample, max); } else { int min = atoi(argv[name_index + 2]); int max = atoi(argv[name_index + 3]); int nbuckets = atoi(argv[name_index + 4]); MetricsLibrary::SendToChrome(name, sample, min, max, nbuckets); metrics_lib.SendToUMA(name, sample, min, max, nbuckets); } } return 0; Loading metrics/metrics_library.cc +4 −23 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /* * metrics_library.cc * * Created on: Dec 1, 2009 * Author: sosa */ #include "metrics_library.h" #include <errno.h> Loading Loading @@ -137,8 +130,7 @@ bool MetricsLibrary::SendToAutotest(const string& name, int value) { return true; } // static bool MetricsLibrary::SendToChrome(const string& name, int sample, bool MetricsLibrary::SendToUMA(const string& name, int sample, int min, int max, int nbuckets) { // Format the message. char message[kBufferSize]; Loading @@ -154,13 +146,7 @@ bool MetricsLibrary::SendToChrome(const string& name, int sample, return SendMessageToChrome(message_length, message); } bool MetricsLibrary::SendToUMA(const string& name, int sample, int min, int max, int nbuckets) { return SendToChrome(name, sample, min, max, nbuckets); } //static bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, int max) { // Format the message. char message[kBufferSize]; Loading @@ -175,8 +161,3 @@ bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, // Send the message. return SendMessageToChrome(message_length, message); } bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, int max) { return SendEnumToChrome(name, sample, max); } metrics/metrics_library.h +0 −14 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /* * metrics_library.h * * Created on: Dec 1, 2009 * Author: sosa */ #ifndef METRICS_LIBRARY_H_ #define METRICS_LIBRARY_H_ Loading Loading @@ -45,10 +38,6 @@ class MetricsLibrary : public MetricsLibraryInterface { bool SendToUMA(const std::string& name, int sample, int min, int max, int nbuckets); // Deprecated. static bool SendToChrome(const std::string& name, int sample, int min, int max, int nbuckets); // Sends linear histogram data to Chrome for transport to UMA and // returns true on success. This method results in the equivalent of // an asynchronous non-blocking RPC to UMA_HISTOGRAM_ENUMERATION Loading @@ -60,9 +49,6 @@ class MetricsLibrary : public MetricsLibraryInterface { // [|max|,infinity) is the implicit overflow bucket. bool SendEnumToUMA(const std::string& name, int sample, int max); // Deprecated. static bool SendEnumToChrome(const std::string& name, int sample, int max); // Sends to Autotest and returns true on success. static bool SendToAutotest(const std::string& name, int value); }; Loading Loading
metrics/README +3 −8 Original line number Diff line number Diff line Loading @@ -42,14 +42,9 @@ a module, you need to do the following: int max) sends a sample for an enumeration (linear) histogram. Currently, the API also includes two deprecated static methods: bool MetricsLibrary::SendToChrome(const std::string& name, int sample, int min, int max, int nbuckets) bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, int max) See the API documentation in metrics_library.h under Before using these methods, a MetricsLibrary object needs to be constructed and initialized through its Init method. See the complete API documentation in metrics_library.h under src/platform/metrics/. - On the target platform, shortly after the sample is sent it should Loading
metrics/metrics_client.cc +4 −2 Original line number Diff line number Diff line Loading @@ -78,14 +78,16 @@ int main(int argc, char** argv) { } if (send_to_chrome) { MetricsLibrary metrics_lib; metrics_lib.Init(); if (send_enum) { int max = atoi(argv[name_index + 2]); MetricsLibrary::SendEnumToChrome(name, sample, max); metrics_lib.SendEnumToUMA(name, sample, max); } else { int min = atoi(argv[name_index + 2]); int max = atoi(argv[name_index + 3]); int nbuckets = atoi(argv[name_index + 4]); MetricsLibrary::SendToChrome(name, sample, min, max, nbuckets); metrics_lib.SendToUMA(name, sample, min, max, nbuckets); } } return 0; Loading
metrics/metrics_library.cc +4 −23 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /* * metrics_library.cc * * Created on: Dec 1, 2009 * Author: sosa */ #include "metrics_library.h" #include <errno.h> Loading Loading @@ -137,8 +130,7 @@ bool MetricsLibrary::SendToAutotest(const string& name, int value) { return true; } // static bool MetricsLibrary::SendToChrome(const string& name, int sample, bool MetricsLibrary::SendToUMA(const string& name, int sample, int min, int max, int nbuckets) { // Format the message. char message[kBufferSize]; Loading @@ -154,13 +146,7 @@ bool MetricsLibrary::SendToChrome(const string& name, int sample, return SendMessageToChrome(message_length, message); } bool MetricsLibrary::SendToUMA(const string& name, int sample, int min, int max, int nbuckets) { return SendToChrome(name, sample, min, max, nbuckets); } //static bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, int max) { // Format the message. char message[kBufferSize]; Loading @@ -175,8 +161,3 @@ bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample, // Send the message. return SendMessageToChrome(message_length, message); } bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, int max) { return SendEnumToChrome(name, sample, max); }
metrics/metrics_library.h +0 −14 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /* * metrics_library.h * * Created on: Dec 1, 2009 * Author: sosa */ #ifndef METRICS_LIBRARY_H_ #define METRICS_LIBRARY_H_ Loading Loading @@ -45,10 +38,6 @@ class MetricsLibrary : public MetricsLibraryInterface { bool SendToUMA(const std::string& name, int sample, int min, int max, int nbuckets); // Deprecated. static bool SendToChrome(const std::string& name, int sample, int min, int max, int nbuckets); // Sends linear histogram data to Chrome for transport to UMA and // returns true on success. This method results in the equivalent of // an asynchronous non-blocking RPC to UMA_HISTOGRAM_ENUMERATION Loading @@ -60,9 +49,6 @@ class MetricsLibrary : public MetricsLibraryInterface { // [|max|,infinity) is the implicit overflow bucket. bool SendEnumToUMA(const std::string& name, int sample, int max); // Deprecated. static bool SendEnumToChrome(const std::string& name, int sample, int max); // Sends to Autotest and returns true on success. static bool SendToAutotest(const std::string& name, int value); }; Loading