Merge "Included metrics for LRU replacement."

This commit is contained in:
Alex Dale
2019-12-18 18:38:34 +00:00
committed by Android (Google) Code Review
6 changed files with 74 additions and 3 deletions

View File

@@ -83,7 +83,6 @@ message ValueMetric {
optional string string_value = 4;
}
// This message contains the specific metrics captured by DrmMetrics. It is
// used for serializing and logging metrics.
// next id: 3.
@@ -94,7 +93,7 @@ message WvCdmMetrics {
// This contains metrics that were captured at the CryptoSession level. These
// include CryptoSession metrics and most OEMCrypto metrics.
// next id: 73
// next id: 77
message CryptoMetrics {
// Crypto Session Metrics.
optional ValueMetric crypto_session_security_level = 1;
@@ -119,6 +118,13 @@ message WvCdmMetrics {
repeated CounterMetric usage_table_header_delete_entry = 60;
repeated DistributionMetric usage_table_header_update_entry_time_us = 56;
repeated CounterMetric usage_table_header_load_entry = 61;
// Usage Table LRU Metrics
optional ValueMetric usage_table_header_lru_usage_info_count = 73;
optional ValueMetric usage_table_header_lru_offline_license_count = 74;
optional ValueMetric usage_table_header_lru_evicted_entry_staleness_s = 75;
// |usage_table_header_lru_evicted_entry_type| refers to the enumeration
// CdmUsageEntryStorageType in wv_cdm_types.h.
optional ValueMetric usage_table_header_lru_evicted_entry_type = 76;
// OemCrypto metrics.
optional ValueMetric oemcrypto_api_version = 16;

View File

@@ -79,6 +79,16 @@ void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics)
crypto_metrics->mutable_usage_table_header_load_entry());
crypto_metrics->set_allocated_usage_table_header_initial_size(
usage_table_header_initial_size_.ToProto());
/* USAGE TABLE HEADER - LRU */
crypto_metrics->set_allocated_usage_table_header_lru_usage_info_count(
usage_table_header_lru_usage_info_count_.ToProto());
crypto_metrics->set_allocated_usage_table_header_lru_offline_license_count(
usage_table_header_lru_offline_license_count_.ToProto());
crypto_metrics
->set_allocated_usage_table_header_lru_evicted_entry_staleness_s(
usage_table_header_lru_evicted_entry_staleness_.ToProto());
crypto_metrics->set_allocated_usage_table_header_lru_evicted_entry_type(
usage_table_header_lru_evicted_entry_type_.ToProto());
/* OEMCRYPTO */
crypto_metrics->set_allocated_oemcrypto_api_version(