Add extra OEMCrypto metrics
[ Merge from http://go/wvgerrit/74924 ] These were not previously being collected or were collected insufficiently. BUG: http://b/121090396 http://b/112919252 Test: Unit tests, Gplay, Nflix, GTS Change-Id: I32b7206cbe6071519b4a483fbcd0920dc1a26961
This commit is contained in:
@@ -413,6 +413,26 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
|
||||
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_update_usage_table_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_create_usage_table_header_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_load_usage_table_header_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_shrink_usage_table_header_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_create_new_usage_entry_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_load_usage_entry_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_move_entry_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_create_old_usage_entry_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_copy_old_usage_entry_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_set_sandbox_.Record("sandbox");
|
||||
crypto_metrics.oemcrypto_set_decrypt_hash_
|
||||
.Increment(OEMCrypto_ERROR_INIT_FAILED);
|
||||
crypto_metrics.oemcrypto_resource_rating_tier_.Record(123);
|
||||
|
||||
WvCdmMetrics::CryptoMetrics actual;
|
||||
crypto_metrics.Serialize(&actual);
|
||||
@@ -481,6 +501,17 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
|
||||
EXPECT_EQ(123, actual.oemcrypto_security_patch_level().int_value());
|
||||
EXPECT_GT(actual.oemcrypto_select_key_time_us_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_update_usage_table_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_create_usage_table_header_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_load_usage_table_header_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_shrink_usage_table_header_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_create_new_usage_entry_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_load_usage_entry_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_move_entry_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_create_old_usage_entry_size(), 0);
|
||||
EXPECT_GT(actual.oemcrypto_copy_old_usage_entry_size(), 0);
|
||||
EXPECT_EQ("sandbox", actual.oemcrypto_set_sandbox().string_value());
|
||||
EXPECT_GT(actual.oemcrypto_set_decrypt_hash_size(), 0);
|
||||
EXPECT_EQ(123, actual.oemcrypto_resource_rating_tier().int_value());
|
||||
}
|
||||
|
||||
} // namespace metrics
|
||||
|
||||
Reference in New Issue
Block a user