Bug 1898649. Disable cert_verifier.cert_trust_evaluation_time metric on Android.

This metric is recorded 600 times during a browser restore of cnn.com
and looks to be the most frequently recorded metric in the parent after
performance.clone.deserialize from bug 1898515.

Differential Revision: https://phabricator.services.mozilla.com/D211530
This commit is contained in:
Jeff Muizelaar 2024-05-24 12:37:55 +00:00
parent 1f85a17830
commit f03d79c7bc

View file

@ -476,16 +476,22 @@ Result NSSCertDBTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
// candidate certificate is a third-party certificate, above.
SECItem candidateCertDERSECItem =
UnsafeMapInputToSECItem(candidateCertDER);
// This metric can be evaluated as many as 600 times during a cnn.com
// load so we avoid measuring it on Android because of the high
// cost of serializing the db everytime we measure.
#ifndef MOZ_WIDGET_ANDROID
auto timerId =
mozilla::glean::cert_verifier::cert_trust_evaluation_time.Start();
#endif
UniqueCERTCertificate candidateCert(CERT_NewTempCertificate(
CERT_GetDefaultCertDB(), &candidateCertDERSECItem, nullptr, false,
true));
#ifndef MOZ_WIDGET_ANDROID
mozilla::glean::cert_verifier::cert_trust_evaluation_time
.StopAndAccumulate(std::move(timerId));
#endif
if (!candidateCert) {
result = MapPRErrorCodeToResult(PR_GetError());
return;