Source release 16.2.0

This commit is contained in:
John W. Bruce
2020-04-10 16:13:07 -07:00
parent 1ff9f8588a
commit b830b1d1fb
883 changed files with 509706 additions and 143739 deletions

20
metrics/src/Android.bp Normal file
View File

@@ -0,0 +1,20 @@
cc_library {
name: "libcdm_metrics_protos",
vendor: true,
srcs: [
"metrics.proto",
],
cflags: [
"-Wall",
"-Werror",
],
proto: {
export_proto_headers: true,
type: "full",
},
}

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: 85
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;
@@ -173,6 +179,19 @@ message WvCdmMetrics {
optional ValueMetric oemcrypto_set_sandbox = 70;
repeated CounterMetric oemcrypto_set_decrypt_hash = 71;
optional ValueMetric oemcrypto_resource_rating_tier = 72;
// TODO(b/142684157): Remove this comment before closing bug.
// OemCrypto V16 metrics start at 77 (4 new metrics pending review).
repeated DistributionMetric
oemcrypto_prep_and_sign_license_request_time_us = 77;
repeated DistributionMetric
oemcrypto_prep_and_sign_renewal_request_time_us = 78;
repeated DistributionMetric
oemcrypto_prep_and_sign_provisioning_request_time_us = 79;
repeated DistributionMetric oemcrypto_load_license_time_us = 80;
repeated DistributionMetric oemcrypto_load_renewal_time_us = 81;
repeated DistributionMetric oemcrypto_load_provisioning_time_us = 82;
optional ValueMetric oemcrypto_minor_api_version = 83;
optional ValueMetric oemcrypto_maximum_usage_table_header_size = 84;
}
// This contains metrics that were captured within a CdmSession. This contains

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(
@@ -184,6 +194,25 @@ void CryptoMetrics::Serialize(WvCdmMetrics::CryptoMetrics *crypto_metrics)
crypto_metrics->mutable_oemcrypto_set_decrypt_hash());
crypto_metrics->set_allocated_oemcrypto_resource_rating_tier(
oemcrypto_resource_rating_tier_.ToProto());
oemcrypto_prep_and_sign_license_request_.ToProto(
crypto_metrics
->mutable_oemcrypto_prep_and_sign_license_request_time_us());
oemcrypto_prep_and_sign_renewal_request_.ToProto(
crypto_metrics
->mutable_oemcrypto_prep_and_sign_renewal_request_time_us());
oemcrypto_prep_and_sign_provisioning_request_.ToProto(
crypto_metrics
->mutable_oemcrypto_prep_and_sign_provisioning_request_time_us());
oemcrypto_load_license_.ToProto(
crypto_metrics->mutable_oemcrypto_load_license_time_us());
oemcrypto_load_renewal_.ToProto(
crypto_metrics->mutable_oemcrypto_load_renewal_time_us());
oemcrypto_load_provisioning_.ToProto(
crypto_metrics->mutable_oemcrypto_load_provisioning_time_us());
crypto_metrics->set_allocated_oemcrypto_minor_api_version(
oemcrypto_minor_api_version_.ToProto());
crypto_metrics->set_allocated_oemcrypto_maximum_usage_table_header_size(
oemcrypto_maximum_usage_table_header_size_.ToProto());
}
SessionMetrics::SessionMetrics() : session_id_(""), completed_(false) {}