shill: Add Network.Shill.Cellular.TimeToConnect metric.
BUG=chromium-os:38086
TEST=Connect modem and look for metric in chrome://histograms
Change-Id: Icd4746508095cc23e104af8d47b3e3a0a03c040f
Reviewed-on: https://gerrit.chromium.org/gerrit/42026
Reviewed-by: Arman Uguray <armansito@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/metrics.h b/metrics.h
index 9775692..73985c2 100644
--- a/metrics.h
+++ b/metrics.h
@@ -179,6 +179,10 @@
static const int kMetricTimeOnlineSecondsNumBuckets;
static const char kMetricTimeResumeToReadyMilliseconds[];
static const char kMetricTimeToConfigMilliseconds[];
+ static const char kMetricTimeToConnectMilliseconds[];
+ static const int kMetricTimeToConnectMillisecondsMax;
+ static const int kMetricTimeToConnectMillisecondsMin;
+ static const int kMetricTimeToConnectMillisecondsNumBuckets;
static const char kMetricTimeToDropSeconds[];
static const int kMetricTimeToDropSecondsMax;
static const int kMetricTimeToDropSecondsMin;
@@ -354,6 +358,12 @@
// Notifies this object that a device has completed the disable process.
void NotifyDeviceDisableFinished(int interface_index);
+ // Notifies this object that a device has started the connect process.
+ void NotifyDeviceConnectStarted(int interface_index);
+
+ // Notifies this object that a device has completed the connect process.
+ void NotifyDeviceConnectFinished(int interface_index);
+
// Sends linear histogram data to UMA.
virtual bool SendEnumToUMA(const std::string &name, int sample, int max);
@@ -398,6 +408,7 @@
scoped_ptr<chromeos_metrics::TimerReporter> initialization_timer;
scoped_ptr<chromeos_metrics::TimerReporter> enable_timer;
scoped_ptr<chromeos_metrics::TimerReporter> disable_timer;
+ scoped_ptr<chromeos_metrics::TimerReporter> connect_timer;
};
typedef std::map<const int, std::tr1::shared_ptr<DeviceMetrics> >
DeviceMetricsLookupMap;