Commit 155b48ec authored by Asami Doi's avatar Asami Doi Committed by Commit Bot

Fix Webapp.CheckServiceWorker.Time metric (CheckOfflineCapability)

Webapp.CheckServiceWorker.Time is used for the Finch experiment
(CheckOfflineCapability), but it always records a minimum value (0.01)
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: Ia0e6172a34ba1e30e4c791e5e38a230aa312eaf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303933
Commit-Queue: Asami Doi <asamidoi@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789822}
parent 4f81fc3f
...@@ -720,7 +720,7 @@ void InstallableManager::OnDidCheckHasServiceWorker( ...@@ -720,7 +720,7 @@ void InstallableManager::OnDidCheckHasServiceWorker(
} }
InstallableMetrics::RecordCheckServiceWorkerTime( InstallableMetrics::RecordCheckServiceWorkerTime(
check_service_worker_start_time - base::TimeTicks::Now()); base::TimeTicks::Now() - check_service_worker_start_time);
InstallableMetrics::RecordCheckServiceWorkerStatus( InstallableMetrics::RecordCheckServiceWorkerStatus(
InstallableMetrics::ConvertFromServiceWorkerCapability(capability)); InstallableMetrics::ConvertFromServiceWorkerCapability(capability));
...@@ -742,7 +742,7 @@ void InstallableManager::OnDidCheckOfflineCapability( ...@@ -742,7 +742,7 @@ void InstallableManager::OnDidCheckOfflineCapability(
} }
InstallableMetrics::RecordCheckServiceWorkerTime( InstallableMetrics::RecordCheckServiceWorkerTime(
check_service_worker_start_time - base::TimeTicks::Now()); base::TimeTicks::Now() - check_service_worker_start_time);
InstallableMetrics::RecordCheckServiceWorkerStatus( InstallableMetrics::RecordCheckServiceWorkerStatus(
InstallableMetrics::ConvertFromOfflineCapability(capability)); InstallableMetrics::ConvertFromOfflineCapability(capability));
......
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