Add Oemcrypto build information to metrics.
Import from http://go/wvgerrit/68385 Adds the build information returned from OEMCrypto_BuildInformation() to the CDM session metrics. Bug: 117117555 Test: Unit tests. GPlay manual. GTS Tests. Change-Id: I505c46fec61a7c62538f843185ec0358f860da79
This commit is contained in:
@@ -98,6 +98,12 @@ CdmResponseType CdmSession::Init(CdmClientPropertySet* cdm_client_property_set,
|
||||
|
||||
security_level_ = crypto_session_->GetSecurityLevel();
|
||||
crypto_metrics_->crypto_session_security_level_.Record(security_level_);
|
||||
std::string oemcrypto_build;
|
||||
if(crypto_session_->GetBuildInformation(&oemcrypto_build)) {
|
||||
metrics_->oemcrypto_build_info_.Record(oemcrypto_build);
|
||||
} else {
|
||||
metrics_->oemcrypto_build_info_.SetError(false);
|
||||
}
|
||||
|
||||
if (!file_handle_->Init(security_level_)) {
|
||||
LOGE("CdmSession::Init: Unable to initialize file handle");
|
||||
|
||||
@@ -278,6 +278,7 @@ class SessionMetrics {
|
||||
|
||||
EventMetric<kKeyRequestTypeFieldNumber, CdmKeyRequestType>
|
||||
cdm_session_license_request_latency_ms_;
|
||||
ValueMetric<std::string> oemcrypto_build_info_;
|
||||
|
||||
// Serialize the session metrics to the provided |metric_group|.
|
||||
// |metric_group| is owned by the caller and must not be null.
|
||||
|
||||
@@ -157,7 +157,7 @@ message WvCdmMetrics {
|
||||
|
||||
// This contains metrics that were captured within a CdmSession. This contains
|
||||
// nested CryptoMetrics that were captured in the context of the session.
|
||||
// next id: 8
|
||||
// next id: 9
|
||||
message SessionMetrics {
|
||||
optional ValueMetric session_id = 1;
|
||||
optional CryptoMetrics crypto_metrics = 2;
|
||||
@@ -166,6 +166,7 @@ message WvCdmMetrics {
|
||||
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;
|
||||
optional ValueMetric oemcrypto_build_info = 8;
|
||||
}
|
||||
|
||||
// These are metrics recorded at the Engine level. This includes CryptoSession
|
||||
|
||||
@@ -177,6 +177,8 @@ void SessionMetrics::SerializeSessionMetrics(
|
||||
session_metrics->mutable_cdm_session_restore_usage_session());
|
||||
cdm_session_license_request_latency_ms_.ToProto(
|
||||
session_metrics->mutable_cdm_session_license_request_latency_ms());
|
||||
session_metrics->set_allocated_oemcrypto_build_info(
|
||||
oemcrypto_build_info_.ToProto());
|
||||
}
|
||||
|
||||
OemCryptoDynamicAdapterMetrics::OemCryptoDynamicAdapterMetrics()
|
||||
|
||||
Reference in New Issue
Block a user