Source release 17.1.0

This commit is contained in:
John "Juce" Bruce
2022-07-07 17:14:31 -07:00
parent 8c17574083
commit 694cf6fb25
2233 changed files with 272026 additions and 223371 deletions

View File

@@ -1,28 +1,23 @@
// Copyright 2017 Google Inc. All Rights Reserved.
// Copyright 2017 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
//
// This file contains implementations for the BaseEventMetric.
#include "event_metric.h"
using ::google::protobuf::RepeatedPtrField;
namespace wvcdm {
namespace metrics {
BaseEventMetric::~BaseEventMetric() {
std::unique_lock<std::mutex> lock(internal_lock_);
for (std::map<std::string, Distribution *>::iterator it = value_map_.begin();
for (std::map<std::string, Distribution*>::iterator it = value_map_.begin();
it != value_map_.end(); it++) {
delete it->second;
}
}
void BaseEventMetric::Record(const std::string &key, double value) {
void BaseEventMetric::Record(const std::string& key, double value) {
std::unique_lock<std::mutex> lock(internal_lock_);
Distribution *distribution;
Distribution* distribution;
if (value_map_.find(key) == value_map_.end()) {
distribution = new Distribution();
value_map_[key] = distribution;
@@ -32,6 +27,5 @@ void BaseEventMetric::Record(const std::string &key, double value) {
distribution->Record(value);
}
} // namespace metrics
} // namespace wvcdm