Fixes widevine metrics proto serialization
Changes to a much more efficient and more reusable protobuf format for metrics. Test: Widevine tests, Google Play and MediaDrm CTS test. Bug: 73724218 Change-Id: I3299051d7a16bcd7758c8f272415ca40e10c1313
This commit is contained in:
@@ -27,23 +27,23 @@ class Distribution {
|
||||
Distribution();
|
||||
|
||||
// Uses the provided sample value to update the computed statistics.
|
||||
void Record(double value);
|
||||
void Record(float value);
|
||||
|
||||
// Return the value for each of the stats computed about the series of
|
||||
// values (min, max, count, etc.).
|
||||
double Min() const { return min_; }
|
||||
double Max() const { return max_; }
|
||||
double Mean() const { return mean_; }
|
||||
int64_t Count() const { return count_; }
|
||||
float Min() const { return min_; }
|
||||
float Max() const { return max_; }
|
||||
float Mean() const { return mean_; }
|
||||
uint64_t Count() const { return count_; }
|
||||
double Variance() const {
|
||||
return count_ == 0 ? 0.0 : sum_squared_deviation_ / count_;
|
||||
}
|
||||
|
||||
private:
|
||||
int64_t count_;
|
||||
double min_;
|
||||
double max_;
|
||||
double mean_;
|
||||
uint64_t count_;
|
||||
float min_;
|
||||
float max_;
|
||||
float mean_;
|
||||
double sum_squared_deviation_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user