Commit 832f62bc authored by Asami Doi's avatar Asami Doi Committed by Commit Bot

Fix ServiceWorker.FetchEvent.QueuingTime metric (CheckOfflineCapability)

ServiceWorker.FetchEvent.QueuingTime is used for the Finch experiment
(CheckOfflineCapability), but it always records a minimum value (0.001)
because the order of a subtraction was wrong. The result of a
subtraction became a minus value and it was rounded to a minimum value.

This CL fixes the order in a subtraction.

Bug: 965802, 1106693
Change-Id: I93b60f301a16caef355e221712372c8e5bcde56f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303236
Commit-Queue: Asami Doi <asamidoi@chromium.org>
Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789810}
parent 98d9c94e
......@@ -2419,7 +2419,7 @@ void ServiceWorkerGlobalScope::NoteRespondedToFetchEvent(
void ServiceWorkerGlobalScope::RecordQueuingTime(base::TimeTicks created_time) {
base::UmaHistogramMediumTimes(
"ServiceWorker.FetchEvent.QueuingTime",
created_time - base::TimeTicks::Now());
base::TimeTicks::Now() - created_time);
}
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment