Bug 1362187 - mathml.doc_count scalar telemetry - r?tjr,francois
Every time a document is destroyed, we record whether MathML was enabled,
which is set to true when a MathML element was bound to the document.
'mathml.doc_count' will report how many such documents existed during a
session. It should be compared to MIXED_CONTENT_PAGE_LOAD, which counts the total number of all page loads.
MozReview-Commit-ID: Euf1apT2LhC
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1766,16 +1766,20 @@ nsDocument::~nsDocument()
Accumulate(Telemetry::CSP_REFERRER_DIRECTIVE, mHasReferrerPolicyCSP);
}
if (mHasUnsafeInlineCSP) {
Accumulate(Telemetry::CSP_UNSAFE_INLINE_DOCUMENTS_COUNT, 1);
}
if (mHasUnsafeEvalCSP) {
Accumulate(Telemetry::CSP_UNSAFE_EVAL_DOCUMENTS_COUNT, 1);
}
+
+ if (MOZ_UNLIKELY(GetMathMLEnabled())) {
+ ScalarAdd(Telemetry::ScalarID::MATHML_DOC_COUNT, 1);
+ }
}
}
ReportUseCounters();
mInDestructor = true;
mInUnlinkOrDeletion = true;
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -702,16 +702,30 @@ webrtc.nicer:
kind: uint
notification_emails:
- webrtc-ice-telemetry-alerts@mozilla.com
release_channel_collection: opt-in
record_in_processes:
- 'main'
- 'content'
+mathml:
+ doc_count:
+ bug_numbers:
+ - 1362187
+ description: >
+ The number of documents that contained enabled MathML elements.
+ expires: "63"
+ kind: uint
+ notification_emails:
+ - gsquelart@mozilla.com
+ release_channel_collection: opt-in
+ record_in_processes:
+ - 'content'
+
mediarecorder:
recording_count:
bug_numbers:
- 1400757
description: >
The number of times a MediaRecorder has been started. Recorded when a MediaRecorder starts
expires: "60"
kind: uint