[CrOS Cellular] Update eSIM installation metrics
This CL updates Network.Cellular.ESim.ProfileDownload.ActivationCode.Latency to only contain the time take for an eSIM profile to be installed from an activation code. It also updates how we record the histogram to allow for longer times and more buckets. Test: Deployed to DUT, ran CQ Bug: b/309528916 Change-Id: Id4577ebf81fd73119b155d18531f998d5b4c517f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5029798 Reviewed-by: Chad Duffin <chadduffin@chromium.org> Commit-Queue: Theo Johnson-kanu <tjohnsonkanu@google.com> Cr-Commit-Position: refs/heads/main@{#1225725}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
971171d643
commit
69edd4a796
chromeos/ash/components/network
tools/metrics/histograms/metadata/network
@ -33,28 +33,6 @@ using ash::cellular_setup::mojom::ProfileInstallMethod;
|
||||
namespace ash {
|
||||
namespace {
|
||||
|
||||
// Measures the time from which this function is called to when |callback|
|
||||
// is expected to run. The measured time difference should capture the time it
|
||||
// took for a profile to be fully downloaded from a provided activation code.
|
||||
CellularESimInstaller::InstallProfileFromActivationCodeCallback
|
||||
CreateTimedInstallProfileCallback(
|
||||
CellularESimInstaller::InstallProfileFromActivationCodeCallback callback) {
|
||||
return base::BindOnce(
|
||||
[](CellularESimInstaller::InstallProfileFromActivationCodeCallback
|
||||
callback,
|
||||
base::Time installation_start_time, HermesResponseStatus result,
|
||||
absl::optional<dbus::ObjectPath> esim_profile_path,
|
||||
absl::optional<std::string> service_path) -> void {
|
||||
std::move(callback).Run(result, esim_profile_path, service_path);
|
||||
if (result != HermesResponseStatus::kSuccess)
|
||||
return;
|
||||
UMA_HISTOGRAM_MEDIUM_TIMES(
|
||||
"Network.Cellular.ESim.ProfileDownload.ActivationCode.Latency",
|
||||
base::Time::Now() - installation_start_time);
|
||||
},
|
||||
std::move(callback), base::Time::Now());
|
||||
}
|
||||
|
||||
void AppendRequiredCellularProperties(
|
||||
const dbus::ObjectPath& euicc_path,
|
||||
const dbus::ObjectPath& profile_path,
|
||||
@ -223,8 +201,7 @@ void CellularESimInstaller::InstallProfileFromActivationCode(
|
||||
&CellularESimInstaller::PerformInstallProfileFromActivationCode,
|
||||
weak_ptr_factory_.GetWeakPtr(), activation_code, confirmation_code,
|
||||
euicc_path, std::move(new_shill_properties), is_initial_install,
|
||||
install_method,
|
||||
CreateTimedInstallProfileCallback(std::move(callback))));
|
||||
install_method, std::move(callback)));
|
||||
}
|
||||
|
||||
void CellularESimInstaller::PerformInstallProfileFromActivationCode(
|
||||
@ -269,7 +246,7 @@ void CellularESimInstaller::PerformInstallProfileFromActivationCode(
|
||||
weak_ptr_factory_.GetWeakPtr(), std::move(callback),
|
||||
std::move(inhibit_lock), euicc_path,
|
||||
std::move(new_shill_properties), is_initial_install,
|
||||
install_method));
|
||||
install_method, base::Time::Now()));
|
||||
}
|
||||
|
||||
void CellularESimInstaller::OnProfileInstallResult(
|
||||
@ -279,6 +256,7 @@ void CellularESimInstaller::OnProfileInstallResult(
|
||||
const base::Value::Dict& new_shill_properties,
|
||||
bool is_initial_install,
|
||||
ProfileInstallMethod install_method,
|
||||
const base::Time installation_start_time,
|
||||
HermesResponseStatus status,
|
||||
dbus::DBusResult dbusResult,
|
||||
const dbus::ObjectPath* profile_path) {
|
||||
@ -306,6 +284,10 @@ void CellularESimInstaller::OnProfileInstallResult(
|
||||
return;
|
||||
}
|
||||
|
||||
UMA_HISTOGRAM_LONG_TIMES_100(
|
||||
"Network.Cellular.ESim.ProfileDownload.ActivationCode.Latency",
|
||||
base::Time::Now() - installation_start_time);
|
||||
|
||||
RecordInstallESimProfileResultLegacy(InstallESimProfileResult::kSuccess,
|
||||
is_managed, is_initial_install,
|
||||
is_install_via_qr_code);
|
||||
|
@ -166,6 +166,7 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) CellularESimInstaller {
|
||||
const base::Value::Dict& new_shill_properties,
|
||||
bool is_initial_install,
|
||||
cellular_setup::mojom::ProfileInstallMethod install_method,
|
||||
const base::Time installation_start_time,
|
||||
HermesResponseStatus status,
|
||||
dbus::DBusResult dbus_result,
|
||||
const dbus::ObjectPath* object_path);
|
||||
|
@ -1243,6 +1243,9 @@ chromium-metrics-reviews@google.com.
|
||||
<summary>
|
||||
Tracks the time for a profile to be fully downloaded from a provided
|
||||
activation code.
|
||||
|
||||
This histogram was updated on 11/16/23 to only start counting how long it
|
||||
takes to install a profile until AFTER we inhibit the cellular device.
|
||||
</summary>
|
||||
</histogram>
|
||||
|
||||
|
Reference in New Issue
Block a user