Included metrics for LRU replacement.
[ Merge of http://go/wvgerrit/88016 ] In the event of an LRU replacement event on AddKey, we gather some metrics on what the state of the usage table is and some info on the the entry that was removed. Metrics collected: - How many usage info (streaming license) in the table - How many offline licenses in the table - What type of entry was evicted from the table - How stale (time since last use) was the evicted entry This also enables unit tests for marshalling the metrics into proto message on Android unit test. Bug: 135046978 Test: Android and Linux unit tests Change-Id: If8e562ae6f98270a0e6c5aa4251127ce9b79a8b0
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user