Fixes missing or broken metrics in Widevine CDM
A few metrics were missing or not properly collected in the CDM metrics. This CL addresses them. Bug: 64570194 Bug: 72866232 Test: Unit tests and Google Play manual test. Change-Id: I3a3aa4fb3eb8422c9c8c398016f02409307beb33
This commit is contained in:
@@ -70,7 +70,6 @@ CdmEngine::CdmEngine(FileSystem* file_system, const std::string& spoid)
|
||||
seeded_ = true;
|
||||
}
|
||||
|
||||
life_span_.Start();
|
||||
metrics_.cdm_engine_creation_time_millis_.Record(clock_.GetCurrentTime());
|
||||
|
||||
std::string cdm_version;
|
||||
@@ -82,9 +81,7 @@ CdmEngine::CdmEngine(FileSystem* file_system, const std::string& spoid)
|
||||
}
|
||||
}
|
||||
|
||||
CdmEngine::~CdmEngine() {
|
||||
M_RECORD(&metrics_, cdm_engine_life_span_, life_span_.AsMs());
|
||||
}
|
||||
CdmEngine::~CdmEngine() {}
|
||||
|
||||
CdmResponseType CdmEngine::SetProvisioningServiceCertificate(
|
||||
const std::string& certificate) {
|
||||
|
||||
@@ -916,8 +916,13 @@ CdmResponseType CdmSession::UpdateUsageEntryInformation() {
|
||||
return INCORRECT_USAGE_SUPPORT_TYPE_2;
|
||||
}
|
||||
|
||||
CdmResponseType sts = usage_table_header_->UpdateEntry(crypto_session_.get(),
|
||||
&usage_entry_);
|
||||
CdmResponseType sts = NO_ERROR;
|
||||
M_TIME(
|
||||
sts = usage_table_header_->UpdateEntry(crypto_session_.get(),
|
||||
&usage_entry_),
|
||||
crypto_metrics_,
|
||||
crypto_session_update_usage_entry_,
|
||||
sts);
|
||||
|
||||
if (sts != NO_ERROR) return sts;
|
||||
|
||||
|
||||
@@ -2093,6 +2093,7 @@ CdmResponseType CryptoSession::UpdateUsageEntry(
|
||||
size_t usage_entry_len = 0;
|
||||
OEMCryptoResult result = OEMCrypto_UpdateUsageEntry(
|
||||
oec_session_id_, NULL, &usage_table_header_len, NULL, &usage_entry_len);
|
||||
metrics_->oemcrypto_update_usage_entry_.Increment(result);
|
||||
|
||||
if (result == OEMCrypto_ERROR_SHORT_BUFFER) {
|
||||
usage_table_header->resize(usage_table_header_len);
|
||||
@@ -2105,6 +2106,7 @@ CdmResponseType CryptoSession::UpdateUsageEntry(
|
||||
&usage_table_header_len,
|
||||
reinterpret_cast<uint8_t*>(const_cast<char*>(usage_entry->data())),
|
||||
&usage_entry_len);
|
||||
metrics_->oemcrypto_update_usage_entry_.Increment(result);
|
||||
}
|
||||
|
||||
if (result != OEMCrypto_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user