Make UMA stats creation available in the Java interface.

Only has counts stats right now but enumeration stats can easily be added in the future if needed.

BUG=webrtc:6313

Review-Url: https://codereview.webrtc.org/2320473002
Cr-Commit-Position: refs/heads/master@{#14146}
This commit is contained in:
sakal
2016-09-09 00:11:48 -07:00
committed by Commit bot
parent 9365338db2
commit 2a5f371df3
4 changed files with 65 additions and 1 deletions

View File

@ -18,6 +18,10 @@
namespace webrtc {
namespace metrics {
// This class does not actually exist. It is casted to an implementation defined
// pointer inside the functions.
class Histogram;
struct SampleInfo {
SampleInfo(const std::string& name, int min, int max, size_t bucket_count);
~SampleInfo();
@ -51,6 +55,9 @@ int NumSamples(const std::string& name);
// Returns the minimum sample value (or -1 if the histogram has no samples).
int MinSample(const std::string& name);
// Function for adding a |sample| to a histogram without checkking the name.
void HistogramAdd(Histogram* histogram_pointer, int sample);
} // namespace metrics
} // namespace webrtc