shill: Adds Network.Shill.Wifi.SignalAtDisconnect UMA stat.
Reports the most recent signal value (in -dBm since the metrics don't
seem to handle negative values) when shill disconnects.
Fixed a few spelling errors in the files involved.
BUG=chromium:217054
TEST=unittest and manual:
On the ChromeOS DUT:
* Connect to a wifi network
* Manually disconnect from the wifi network
* Wait a few seconds (it takes a little time for the stat to propagate)
* Navigate to chrome://histograms
* Search for Network.Shill.Wifi.SignalAtDisconnect (verify that it
exists).
Change-Id: I6cb98937529036006abb019946f5c337bf01b1cc
Reviewed-on: https://chromium-review.googlesource.com/170668
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
diff --git a/metrics.h b/metrics.h
index 0503a6e..daa1ba6 100644
--- a/metrics.h
+++ b/metrics.h
@@ -265,6 +265,10 @@
static const int kMetricDisconnectMax;
static const int kMetricDisconnectMin;
static const int kMetricDisconnectNumBuckets;
+ static const char kMetricSignalAtDisconnect[];
+ static const int kMetricSignalAtDisconnectMin;
+ static const int kMetricSignalAtDisconnectMax;
+ static const int kMetricSignalAtDisconnectNumBuckets;
static const char kMetricNetworkApMode[];
static const char kMetricNetworkChannel[];
static const int kMetricNetworkChannelMax;
@@ -473,6 +477,10 @@
// Notifies this object that |service| has been disconnected.
void NotifyServiceDisconnect(const Service *service);
+ // Notifies this object of power at disconnect.
+ void NotifySignalAtDisconnect(const Service &service,
+ int16_t signal_strength);
+
// Notifies this object of a power management state change.
void NotifyPowerStateChange(PowerManager::SuspendState new_state);
@@ -536,7 +544,7 @@
// Notifies this object that a device has completed the scanning process.
virtual void NotifyDeviceScanFinished(int interface_index);
- // Terminates an underay scan (does nothing if a scan wasn't underay).
+ // Terminates an underway scan (does nothing if a scan wasn't underway).
virtual void ResetScanTimer(int interface_index);
// Notifies this object that a device has started the connect process.