Commit 07da21f9 authored by Ryan Hansberry's avatar Ryan Hansberry Committed by Commit Bot

[Tether] Record and log when KeepAliveOperation concludes.

Record to boolean metric if KeepAliveOperation was successful, in order
to track improvements to Instant Tethering session stability. Also add
respective logs for future debugging of this issue.

Trial run:
I connected to an Instant Tethering host and let it remain connected as
long as possible (until underlying bugs broke connection). The results
are:
  * Total session time: 1 hour and 12 minutes (not great!).
  * Success count: 15, Failure count: 4.
  * Success rate: 78.9% (not great!).

Bug: b:143982534
Change-Id: I69723abb1e6f86713a3919a7e4e453e51e686abb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1970830Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726668}
parent e4ae2057
......@@ -5,6 +5,7 @@
#include "chromeos/components/tether/keep_alive_scheduler.h"
#include "base/bind.h"
#include "base/metrics/histogram_functions.h"
#include "chromeos/components/tether/device_id_tether_network_guid_map.h"
#include "chromeos/components/tether/host_scan_cache.h"
#include "chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h"
......@@ -81,12 +82,18 @@ void KeepAliveScheduler::OnOperationFinished(
keep_alive_operation_->RemoveObserver(this);
keep_alive_operation_.reset();
base::UmaHistogramBoolean("InstantTethering.KeepAliveTickle.Result",
device_status.get());
if (!device_status) {
// If the operation did not complete successfully, there is no new
// information with which to update the cache.
PA_LOG(WARNING) << "Failed to send KeepAliveTickle message.";
return;
}
PA_LOG(INFO) << "Successfully sent KeepAliveTickle message.";
std::string carrier;
int32_t battery_percentage;
int32_t signal_strength;
......
......@@ -61210,6 +61210,16 @@ uploading your change for review.
</summary>
</histogram>
<histogram name="InstantTethering.KeepAliveTickle.Result" enum="BooleanSuccess"
expires_after="2020-12-16">
<owner>hansberry@chromium.org</owner>
<owner>better-together-dev@google.com</owner>
<summary>
Captures the count of successful and failed attempts to send a
'KeepAliveTickle' message to the phone.
</summary>
</histogram>
<histogram name="InstantTethering.MultiDeviceFeatureState"
enum="MultiDevice_FeatureState" expires_after="2020-02-19">
<owner>hansberry@chromium.org</owner>
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