Source release 14.1.0
This commit is contained in:
@@ -106,7 +106,7 @@ class CounterMetric : public BaseCounterMetric {
|
||||
}
|
||||
|
||||
void ToProto(::google::protobuf::RepeatedPtrField<drm_metrics::CounterMetric>
|
||||
*counters);
|
||||
*counters) const;
|
||||
|
||||
private:
|
||||
friend class CounterMetricTest;
|
||||
@@ -121,7 +121,7 @@ template <>
|
||||
inline void CounterMetric<0, util::Unused, 0, util::Unused, 0, util::Unused, 0,
|
||||
util::Unused>::
|
||||
ToProto(::google::protobuf::RepeatedPtrField<drm_metrics::CounterMetric>
|
||||
*counters) {
|
||||
*counters) const {
|
||||
|
||||
const std::map<std::string, int64_t>* values = GetValues();
|
||||
for (std::map<std::string, int64_t>::const_iterator it = values->begin();
|
||||
@@ -135,7 +135,7 @@ template <int I1, typename F1, int I2, typename F2, int I3, typename F3, int I4,
|
||||
typename F4>
|
||||
inline void CounterMetric<I1, F1, I2, F2, I3, F3, I4, F4>::ToProto(
|
||||
::google::protobuf::RepeatedPtrField<drm_metrics::CounterMetric>
|
||||
*counters) {
|
||||
*counters) const {
|
||||
const std::map<std::string, int64_t>* values = GetValues();
|
||||
for (std::map<std::string, int64_t>::const_iterator it = values->begin();
|
||||
it != values->end(); it++) {
|
||||
|
||||
@@ -110,7 +110,7 @@ class EventMetric : public BaseEventMetric {
|
||||
|
||||
void ToProto(
|
||||
::google::protobuf::RepeatedPtrField<drm_metrics::DistributionMetric>
|
||||
*distributions_proto);
|
||||
*distributions_proto) const;
|
||||
|
||||
private:
|
||||
friend class EventMetricTest;
|
||||
@@ -118,7 +118,7 @@ class EventMetric : public BaseEventMetric {
|
||||
|
||||
inline void SetDistributionValues(
|
||||
const Distribution &distribution,
|
||||
drm_metrics::DistributionMetric *metric_proto) {
|
||||
drm_metrics::DistributionMetric *metric_proto) const {
|
||||
metric_proto->set_mean(distribution.Mean());
|
||||
metric_proto->set_operation_count(distribution.Count());
|
||||
if (distribution.Count() > 1) {
|
||||
@@ -140,7 +140,7 @@ inline void EventMetric<0, util::Unused, 0, util::Unused, 0, util::Unused, 0,
|
||||
util::Unused>::
|
||||
ToProto(
|
||||
::google::protobuf::RepeatedPtrField<drm_metrics::DistributionMetric>
|
||||
*distributions_proto) {
|
||||
*distributions_proto) const {
|
||||
const std::map<std::string, Distribution *>* distributions
|
||||
= GetDistributions();
|
||||
for (std::map<std::string, Distribution *>::const_iterator it =
|
||||
@@ -154,7 +154,7 @@ template <int I1, typename F1, int I2, typename F2, int I3, typename F3, int I4,
|
||||
typename F4>
|
||||
inline void EventMetric<I1, F1, I2, F2, I3, F3, I4, F4>::ToProto(
|
||||
::google::protobuf::RepeatedPtrField<drm_metrics::DistributionMetric>
|
||||
*distributions_proto) {
|
||||
*distributions_proto) const {
|
||||
const std::map<std::string, Distribution *>* distributions
|
||||
= GetDistributions();
|
||||
for (std::map<std::string, Distribution *>::const_iterator it =
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "counter_metric.h"
|
||||
#include "event_metric.h"
|
||||
#include "metrics.pb.h"
|
||||
#include "timer_metric.h"
|
||||
#include "value_metric.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
@@ -81,6 +82,8 @@ const int kKeyStatusTypeFieldNumber =
|
||||
::drm_metrics::Attributes::kKeyStatusTypeFieldNumber;
|
||||
const int kEventTypeFieldNumber =
|
||||
::drm_metrics::Attributes::kEventTypeFieldNumber;
|
||||
const int kKeyRequestTypeFieldNumber =
|
||||
::drm_metrics::Attributes::kKeyRequestTypeFieldNumber;
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
@@ -110,7 +113,8 @@ typedef enum OEMCryptoInitializationMode {
|
||||
// This class contains metrics for Crypto Session and OEM Crypto.
|
||||
class CryptoMetrics {
|
||||
public:
|
||||
void Serialize(drm_metrics::WvCdmMetrics::CryptoMetrics *crypto_metrics);
|
||||
void Serialize(drm_metrics::WvCdmMetrics::CryptoMetrics *crypto_metrics)
|
||||
const;
|
||||
|
||||
/* CRYPTO SESSION */
|
||||
// TODO(blueeyes): Convert this to crypto_session_default_security_level_.
|
||||
@@ -144,6 +148,8 @@ class CryptoMetrics {
|
||||
ValueMetric<uint32_t> crypto_session_system_id_;
|
||||
EventMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
crypto_session_update_usage_information_;
|
||||
EventMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
crypto_session_update_usage_entry_;
|
||||
ValueMetric<bool> crypto_session_usage_information_support_;
|
||||
/* OEMCRYPTO */
|
||||
ValueMetric<uint32_t> oemcrypto_api_version_;
|
||||
@@ -225,6 +231,8 @@ class CryptoMetrics {
|
||||
ValueMetric<CdmUsageSupportType> oemcrypto_usage_table_support_;
|
||||
CounterMetric<kOemCryptoResultFieldNumber, OEMCryptoResult>
|
||||
oemcrypto_update_usage_table_;
|
||||
CounterMetric<kOemCryptoResultFieldNumber, OEMCryptoResult>
|
||||
oemcrypto_update_usage_entry_;
|
||||
};
|
||||
|
||||
// This class contains session-scoped metrics. All properties and
|
||||
@@ -262,13 +270,17 @@ class SessionMetrics {
|
||||
CounterMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
cdm_session_restore_usage_session_;
|
||||
|
||||
EventMetric<kKeyRequestTypeFieldNumber, CdmKeyRequestType>
|
||||
cdm_session_license_request_latency_ms_;
|
||||
|
||||
// Serialize the session metrics to the provided |metric_group|.
|
||||
// |metric_group| is owned by the caller and must not be null.
|
||||
void Serialize(drm_metrics::WvCdmMetrics::SessionMetrics *session_metrics);
|
||||
void Serialize(drm_metrics::WvCdmMetrics::SessionMetrics *session_metrics)
|
||||
const;
|
||||
|
||||
private:
|
||||
void SerializeSessionMetrics(
|
||||
drm_metrics::WvCdmMetrics::SessionMetrics *session_metrics);
|
||||
drm_metrics::WvCdmMetrics::SessionMetrics *session_metrics) const;
|
||||
CdmSessionId session_id_;
|
||||
bool completed_;
|
||||
CryptoMetrics crypto_metrics_;
|
||||
@@ -294,13 +306,14 @@ class OemCryptoDynamicAdapterMetrics {
|
||||
|
||||
// Serialize the session metrics to the provided |metric_group|.
|
||||
// |metric_group| is owned by the caller and must not be null.
|
||||
void Serialize(drm_metrics::WvCdmMetrics::EngineMetrics *engine_metrics);
|
||||
void Serialize(drm_metrics::WvCdmMetrics::EngineMetrics *engine_metrics)
|
||||
const;
|
||||
|
||||
// Clears the existing metric values.
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
Lock adapter_lock_;
|
||||
mutable Lock adapter_lock_;
|
||||
ValueMetric<OEMCryptoInitializationMode> oemcrypto_initialization_mode_;
|
||||
ValueMetric<uint32_t> oemcrypto_l1_api_version_;
|
||||
ValueMetric<uint32_t> oemcrypto_l1_min_api_version_;
|
||||
@@ -346,7 +359,7 @@ class EngineMetrics {
|
||||
// void Serialize(drm_metrics::MetricsGroup* metric_group, bool
|
||||
// completed_only,
|
||||
// bool clear_serialized_sessions);
|
||||
void Serialize(drm_metrics::WvCdmMetrics *engine_metrics);
|
||||
void Serialize(drm_metrics::WvCdmMetrics *engine_metrics) const;
|
||||
|
||||
void SetAppPackageName(const std::string &app_package_name);
|
||||
|
||||
@@ -371,7 +384,6 @@ class EngineMetrics {
|
||||
cdm_engine_get_usage_info_;
|
||||
EventMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
cdm_engine_handle_provisioning_response_;
|
||||
ValueMetric<double> cdm_engine_life_span_; // Milliseconds
|
||||
CounterMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
cdm_engine_open_key_set_session_;
|
||||
CounterMetric<kErrorCodeFieldNumber, CdmResponseType>
|
||||
@@ -393,13 +405,15 @@ class EngineMetrics {
|
||||
cdm_engine_unprovision_;
|
||||
|
||||
private:
|
||||
Lock session_metrics_lock_;
|
||||
mutable Lock session_metrics_lock_;
|
||||
std::vector<metrics::SessionMetrics *> session_metrics_list_;
|
||||
// This is used to populate the engine lifespan metric
|
||||
metrics::TimerMetric life_span_internal_;
|
||||
CryptoMetrics crypto_metrics_;
|
||||
std::string app_package_name_;
|
||||
|
||||
void SerializeEngineMetrics(
|
||||
drm_metrics::WvCdmMetrics::EngineMetrics *engine_metrics);
|
||||
drm_metrics::WvCdmMetrics::EngineMetrics *engine_metrics) const;
|
||||
};
|
||||
|
||||
} // namespace metrics
|
||||
|
||||
@@ -9,13 +9,23 @@ namespace metrics {
|
||||
class TimerMetric {
|
||||
|
||||
public:
|
||||
// Starts the clock running. If the clock was previously set, this resets it.
|
||||
// IsStarted will return true after this call.
|
||||
void Start();
|
||||
// Returns whether or not the timer has started.
|
||||
bool IsStarted() const { return is_started_; };
|
||||
// Stops the clock and clears the current value. IsStarted will return false
|
||||
// after this call.
|
||||
void Clear();
|
||||
// Returns the current clock value as milliseconds (AsMs) or microseconds
|
||||
// (AsUs).
|
||||
double AsMs() const;
|
||||
double AsUs() const;
|
||||
|
||||
private:
|
||||
double sec_;
|
||||
double usec_;
|
||||
bool is_started_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class ValueMetric {
|
||||
|
||||
// Returns a new ValueMetric proto containing the metric value or the
|
||||
// error code. If neither the error or value are set, it returns nullptr.
|
||||
drm_metrics::ValueMetric *ToProto() {
|
||||
drm_metrics::ValueMetric *ToProto() const {
|
||||
if (has_error_) {
|
||||
drm_metrics::ValueMetric *value_proto = new drm_metrics::ValueMetric;
|
||||
value_proto->set_error_code(error_code_);
|
||||
|
||||
@@ -72,6 +72,14 @@ void SetAttributeField<drm_metrics::Attributes::kSigningAlgorithmFieldNumber,
|
||||
attributes->set_signing_algorithm(signing_algorithm);
|
||||
}
|
||||
|
||||
template <>
|
||||
void SetAttributeField<drm_metrics::Attributes::kKeyRequestTypeFieldNumber,
|
||||
CdmKeyRequestType>(
|
||||
const CdmKeyRequestType &key_request_type,
|
||||
drm_metrics::Attributes *attributes) {
|
||||
attributes->set_key_request_type(key_request_type);
|
||||
}
|
||||
|
||||
template <>
|
||||
void SetAttributeField<0, util::Unused>(const util::Unused &,
|
||||
drm_metrics::Attributes *) {
|
||||
|
||||
@@ -44,6 +44,8 @@ message Attributes {
|
||||
optional uint32 key_status_type = 14;
|
||||
// Defined at ::android::hardware::drm::V1_0::EventType;
|
||||
optional uint32 event_type = 15;
|
||||
// Contains the CdmKeyRequestType defined in wv_cdm_types.h.
|
||||
optional uint32 key_request_type = 16;
|
||||
}
|
||||
|
||||
// The Counter message is used to store a count value with an associated
|
||||
@@ -88,7 +90,7 @@ message WvCdmMetrics {
|
||||
|
||||
// This contains metrics that were captured at the CryptoSession level. These
|
||||
// include CryptoSession metrics and most OEMCrypto metrics.
|
||||
// next id: 56
|
||||
// next id: 58
|
||||
message CryptoMetrics {
|
||||
// Crypto Session Metrics.
|
||||
optional ValueMetric crypto_session_security_level = 1;
|
||||
@@ -105,6 +107,7 @@ message WvCdmMetrics {
|
||||
repeated DistributionMetric crypto_session_open_time_us = 12;
|
||||
optional ValueMetric crypto_session_system_id = 13;
|
||||
repeated DistributionMetric crypto_session_update_usage_information_time_us = 14;
|
||||
repeated DistributionMetric crypto_session_update_usage_entry_time_us = 56;
|
||||
optional ValueMetric crypto_session_usage_information_support = 15;
|
||||
// OemCrypto metrics.
|
||||
optional ValueMetric oemcrypto_api_version = 16;
|
||||
@@ -147,11 +150,12 @@ message WvCdmMetrics {
|
||||
repeated DistributionMetric oemcrypto_select_key_time_us = 53;
|
||||
optional ValueMetric oemcrypto_usage_table_support = 54;
|
||||
repeated CounterMetric oemcrypto_update_usage_table = 55;
|
||||
repeated CounterMetric oemcrypto_update_usage_entry = 57;
|
||||
}
|
||||
|
||||
// This contains metrics that were captured within a CdmSession. This contains
|
||||
// nested CryptoMetrics that were captured in the context of the session.
|
||||
// next id: 7
|
||||
// next id: 8
|
||||
message SessionMetrics {
|
||||
optional ValueMetric session_id = 1;
|
||||
optional CryptoMetrics crypto_metrics = 2;
|
||||
@@ -159,6 +163,7 @@ message WvCdmMetrics {
|
||||
repeated DistributionMetric cdm_session_renew_key_time_us = 4;
|
||||
repeated CounterMetric cdm_session_restore_offline_session = 5;
|
||||
repeated CounterMetric cdm_session_restore_usage_session = 6;
|
||||
repeated DistributionMetric cdm_session_license_request_latency_ms = 7;
|
||||
}
|
||||
|
||||
// These are metrics recorded at the Engine level. This includes CryptoSession
|
||||
@@ -184,7 +189,7 @@ message WvCdmMetrics {
|
||||
repeated CounterMetric cdm_engine_get_secure_stop_ids = 15;
|
||||
repeated DistributionMetric cdm_engine_get_usage_info_time_us = 16;
|
||||
repeated DistributionMetric cdm_engine_handle_provisioning_response_time_us = 17;
|
||||
optional ValueMetric cdm_engine_life_span = 18;
|
||||
optional ValueMetric cdm_engine_life_span_ms = 18;
|
||||
repeated CounterMetric cdm_engine_open_key_set_session = 19;
|
||||
repeated CounterMetric cdm_engine_open_session = 20;
|
||||
repeated DistributionMetric cdm_engine_query_key_status_time_us = 21;
|
||||
|
||||
@@ -29,7 +29,8 @@ struct CompareSessionIds {
|
||||
namespace wvcdm {
|
||||
namespace metrics {
|
||||
|
||||
void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics) {
|
||||
void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics)
|
||||
const {
|
||||
/* CRYPTO SESSION */
|
||||
crypto_metrics->set_allocated_crypto_session_security_level(
|
||||
crypto_session_security_level_.ToProto());
|
||||
@@ -62,6 +63,8 @@ void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics) {
|
||||
crypto_session_update_usage_information_.ToProto(
|
||||
crypto_metrics
|
||||
->mutable_crypto_session_update_usage_information_time_us());
|
||||
crypto_session_update_usage_entry_.ToProto(
|
||||
crypto_metrics->mutable_crypto_session_update_usage_entry_time_us());
|
||||
crypto_metrics->set_allocated_crypto_session_usage_information_support(
|
||||
crypto_session_usage_information_support_.ToProto());
|
||||
|
||||
@@ -145,22 +148,20 @@ void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics) {
|
||||
oemcrypto_usage_table_support_.ToProto());
|
||||
oemcrypto_update_usage_table_.ToProto(
|
||||
crypto_metrics->mutable_oemcrypto_update_usage_table());
|
||||
oemcrypto_update_usage_entry_.ToProto(
|
||||
crypto_metrics->mutable_oemcrypto_update_usage_entry());
|
||||
}
|
||||
|
||||
SessionMetrics::SessionMetrics()
|
||||
: cdm_session_life_span_(),
|
||||
cdm_session_renew_key_(),
|
||||
cdm_session_restore_offline_session_(),
|
||||
cdm_session_restore_usage_session_(),
|
||||
completed_(false) {}
|
||||
SessionMetrics::SessionMetrics() {}
|
||||
|
||||
void SessionMetrics::Serialize(WvCdmMetrics::SessionMetrics *session_metrics) {
|
||||
void SessionMetrics::Serialize(WvCdmMetrics::SessionMetrics *session_metrics)
|
||||
const {
|
||||
SerializeSessionMetrics(session_metrics);
|
||||
crypto_metrics_.Serialize(session_metrics->mutable_crypto_metrics());
|
||||
}
|
||||
|
||||
void SessionMetrics::SerializeSessionMetrics(
|
||||
WvCdmMetrics::SessionMetrics *session_metrics) {
|
||||
WvCdmMetrics::SessionMetrics *session_metrics) const {
|
||||
// If the session id was set, add it to the metrics. It's possible that
|
||||
// it's not set in some circumstances such as when provisioning is needed.
|
||||
if (!session_id_.empty()) {
|
||||
@@ -174,6 +175,8 @@ void SessionMetrics::SerializeSessionMetrics(
|
||||
session_metrics->mutable_cdm_session_restore_offline_session());
|
||||
cdm_session_restore_usage_session_.ToProto(
|
||||
session_metrics->mutable_cdm_session_restore_usage_session());
|
||||
cdm_session_license_request_latency_ms_.ToProto(
|
||||
session_metrics->mutable_cdm_session_license_request_latency_ms());
|
||||
}
|
||||
|
||||
OemCryptoDynamicAdapterMetrics::OemCryptoDynamicAdapterMetrics()
|
||||
@@ -198,7 +201,7 @@ void OemCryptoDynamicAdapterMetrics::SetL1MinApiVersion(uint32_t version) {
|
||||
}
|
||||
|
||||
void OemCryptoDynamicAdapterMetrics::Serialize(
|
||||
WvCdmMetrics::EngineMetrics *engine_metrics) {
|
||||
WvCdmMetrics::EngineMetrics *engine_metrics) const {
|
||||
AutoLock lock(adapter_lock_);
|
||||
|
||||
engine_metrics->set_allocated_oemcrypto_initialization_mode(
|
||||
@@ -227,30 +230,9 @@ OemCryptoDynamicAdapterMetrics &GetDynamicAdapterMetricsInstance() {
|
||||
return *adapter_metrics;
|
||||
}
|
||||
|
||||
EngineMetrics::EngineMetrics()
|
||||
: cdm_engine_add_key_(),
|
||||
cdm_engine_cdm_version_(),
|
||||
cdm_engine_close_session_(),
|
||||
cdm_engine_creation_time_millis_(),
|
||||
cdm_engine_decrypt_(),
|
||||
cdm_engine_find_session_for_key_(),
|
||||
cdm_engine_generate_key_request_(),
|
||||
cdm_engine_get_provisioning_request_(),
|
||||
cdm_engine_get_secure_stop_ids_(),
|
||||
cdm_engine_get_usage_info_(),
|
||||
cdm_engine_handle_provisioning_response_(),
|
||||
cdm_engine_life_span_(),
|
||||
cdm_engine_open_key_set_session_(),
|
||||
cdm_engine_open_session_(),
|
||||
cdm_engine_query_key_status_(),
|
||||
cdm_engine_release_all_usage_info_(),
|
||||
cdm_engine_release_usage_info_(),
|
||||
cdm_engine_remove_all_usage_info_(),
|
||||
cdm_engine_remove_keys_(),
|
||||
cdm_engine_remove_usage_info_(),
|
||||
cdm_engine_restore_key_(),
|
||||
cdm_engine_unprovision_(),
|
||||
app_package_name_("") {}
|
||||
EngineMetrics::EngineMetrics() {
|
||||
life_span_internal_.Start();
|
||||
}
|
||||
|
||||
EngineMetrics::~EngineMetrics() {
|
||||
AutoLock lock(session_metrics_lock_);
|
||||
@@ -281,7 +263,7 @@ void EngineMetrics::RemoveSession(wvcdm::CdmSessionId session_id) {
|
||||
session_metrics_list_.end());
|
||||
}
|
||||
|
||||
void EngineMetrics::Serialize(WvCdmMetrics *wv_metrics) {
|
||||
void EngineMetrics::Serialize(WvCdmMetrics *wv_metrics) const {
|
||||
AutoLock lock(session_metrics_lock_);
|
||||
WvCdmMetrics::EngineMetrics *engine_metrics =
|
||||
wv_metrics->mutable_engine_metrics();
|
||||
@@ -294,8 +276,6 @@ void EngineMetrics::Serialize(WvCdmMetrics *wv_metrics) {
|
||||
app_package_name_);
|
||||
}
|
||||
SerializeEngineMetrics(engine_metrics);
|
||||
LOGE("Serializing session metrics. Session Count: %d",
|
||||
session_metrics_list_.size());
|
||||
|
||||
for (std::vector<metrics::SessionMetrics *>::const_iterator it =
|
||||
session_metrics_list_.begin(); it != session_metrics_list_.end(); it++) {
|
||||
@@ -308,7 +288,10 @@ void EngineMetrics::SetAppPackageName(const std::string &app_package_name) {
|
||||
}
|
||||
|
||||
void EngineMetrics::SerializeEngineMetrics(
|
||||
WvCdmMetrics::EngineMetrics *engine_metrics) {
|
||||
WvCdmMetrics::EngineMetrics *engine_metrics) const {
|
||||
// Set the engine lifespan at the time of serialization.
|
||||
engine_metrics->mutable_cdm_engine_life_span_ms()->set_int_value(
|
||||
life_span_internal_.AsMs());
|
||||
cdm_engine_add_key_.ToProto(
|
||||
engine_metrics->mutable_cdm_engine_add_key_time_us());
|
||||
engine_metrics->set_allocated_cdm_engine_cdm_version(
|
||||
@@ -332,8 +315,6 @@ void EngineMetrics::SerializeEngineMetrics(
|
||||
cdm_engine_handle_provisioning_response_.ToProto(
|
||||
engine_metrics
|
||||
->mutable_cdm_engine_handle_provisioning_response_time_us());
|
||||
engine_metrics->set_allocated_cdm_engine_life_span(
|
||||
cdm_engine_life_span_.ToProto()),
|
||||
cdm_engine_open_key_set_session_.ToProto(
|
||||
engine_metrics->mutable_cdm_engine_open_key_set_session());
|
||||
cdm_engine_open_session_.ToProto(
|
||||
|
||||
@@ -11,6 +11,13 @@ void TimerMetric::Start() {
|
||||
gettimeofday(&tv, NULL);
|
||||
sec_ = tv.tv_sec;
|
||||
usec_ = tv.tv_usec;
|
||||
is_started_ = true;
|
||||
}
|
||||
|
||||
void TimerMetric::Clear() {
|
||||
is_started_ = false;
|
||||
sec_ = 0;
|
||||
usec_ = 0;
|
||||
}
|
||||
|
||||
double TimerMetric::AsMs() const {
|
||||
|
||||
@@ -128,16 +128,14 @@ TEST_F(EventMetricTest, ThreeFieldsSuccess) {
|
||||
EXPECT_FALSE(metric_proto.test_distributions(0).has_variance());
|
||||
EXPECT_EQ(7, metric_proto.test_distributions(0).attributes().error_code());
|
||||
EXPECT_EQ(8u, metric_proto.test_distributions(0).attributes().length());
|
||||
EXPECT_EQ(false,
|
||||
metric_proto.test_distributions(0).attributes().error_code_bool());
|
||||
EXPECT_FALSE(metric_proto.test_distributions(0).attributes().error_code_bool());
|
||||
|
||||
EXPECT_EQ(1u, metric_proto.test_distributions(1).operation_count());
|
||||
EXPECT_EQ(11LL, metric_proto.test_distributions(1).mean());
|
||||
EXPECT_FALSE(metric_proto.test_distributions(1).has_variance());
|
||||
EXPECT_EQ(8, metric_proto.test_distributions(1).attributes().error_code());
|
||||
EXPECT_EQ(16u, metric_proto.test_distributions(1).attributes().length());
|
||||
EXPECT_EQ(true,
|
||||
metric_proto.test_distributions(1).attributes().error_code_bool());
|
||||
EXPECT_TRUE(metric_proto.test_distributions(1).attributes().error_code_bool());
|
||||
}
|
||||
|
||||
TEST_F(EventMetricTest, FourFieldsSuccess) {
|
||||
@@ -158,8 +156,7 @@ TEST_F(EventMetricTest, FourFieldsSuccess) {
|
||||
EXPECT_FALSE(metric_proto.test_distributions(0).has_variance());
|
||||
EXPECT_EQ(7, metric_proto.test_distributions(0).attributes().error_code());
|
||||
EXPECT_EQ(8u, metric_proto.test_distributions(0).attributes().length());
|
||||
EXPECT_EQ(true,
|
||||
metric_proto.test_distributions(0).attributes().error_code_bool());
|
||||
EXPECT_TRUE(metric_proto.test_distributions(0).attributes().error_code_bool());
|
||||
EXPECT_EQ(
|
||||
3u, metric_proto.test_distributions(0).attributes().cdm_security_level());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user