зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1778135 - Add profile marker for ORB safelist check. r=necko-reviewers,smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D164569
This commit is contained in:
Родитель
03a7b88b41
Коммит
e2cdc7e8c3
|
@ -3104,6 +3104,8 @@ HttpBaseChannel::PerformOpaqueResponseSafelistCheckBeforeSniff() {
|
|||
OPAQUE_RESPONSE_BLOCKING_CROSS_ORIGIN_OPAQUE_RESPONSE_COUNT,
|
||||
1);
|
||||
|
||||
PROFILER_MARKER_TEXT("ORB safelist check", NETWORK, {}, "Before sniff"_ns);
|
||||
|
||||
// https://whatpr.org/fetch/1442.html#orb-algorithm
|
||||
// Step 1
|
||||
nsAutoCString contentType;
|
||||
|
@ -3204,6 +3206,8 @@ HttpBaseChannel::PerformOpaqueResponseSafelistCheckBeforeSniff() {
|
|||
// * `OpaqueResponseBlocker::ValidateJavaScript`
|
||||
OpaqueResponse HttpBaseChannel::PerformOpaqueResponseSafelistCheckAfterSniff(
|
||||
const nsACString& aContentType, bool aNoSniff) {
|
||||
PROFILER_MARKER_TEXT("ORB safelist check", NETWORK, {}, "After sniff"_ns);
|
||||
|
||||
// https://whatpr.org/fetch/1442.html#orb-algorithm
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
MOZ_ASSERT(mCachedOpaqueResponseBlockingPref);
|
||||
|
|
|
@ -385,6 +385,16 @@ static void RecordTelemetry(const TimeStamp& aStartOfValidation,
|
|||
}();
|
||||
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
PROFILER_MARKER_TEXT(
|
||||
"ORB safelist check", NETWORK,
|
||||
MarkerTiming::Interval(aStartOfValidation, aStartOfJavaScriptValidation),
|
||||
nsPrintfCString("Receive data for validation (%s)", key.get()));
|
||||
|
||||
PROFILER_MARKER_TEXT(
|
||||
"ORB safelist check", NETWORK,
|
||||
MarkerTiming::Interval(aStartOfJavaScriptValidation, now),
|
||||
nsPrintfCString("JS Validation (%s)", key.get()));
|
||||
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::ORB_RECEIVE_DATA_FOR_VALIDATION_MS,
|
||||
key, aStartOfValidation,
|
||||
aStartOfJavaScriptValidation);
|
||||
|
|
Загрузка…
Ссылка в новой задаче