Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2221103003: Compute effective connection type dynamically (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PS Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator.h
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index 973b92579bb653fa452e25dc3a6f6c19cff57785..b4ff50723adc8460689d21d585ef36f09d402a1f 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -295,6 +295,8 @@ class NET_EXPORT NetworkQualityEstimator
virtual double RandDouble() const;
private:
+ FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
+ AdaptiveRecomputationEffectiveConnectionType);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ObtainOperatingParams);
@@ -305,6 +307,8 @@ class NET_EXPORT NetworkQualityEstimator
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
TestExternalEstimateProviderMergeEstimates);
+ FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
+ UnknownEffectiveConnectionType);
// Value of round trip time observations is in base::TimeDelta.
typedef nqe::internal::Observation<base::TimeDelta> RttObservation;
@@ -508,13 +512,6 @@ class NET_EXPORT NetworkQualityEstimator
// Tick clock used by the network quality estimator.
std::unique_ptr<base::TickClock> tick_clock_;
- // Minimum duration between two consecutive computations of effective
- // connection type. Set to non-zero value as a performance optimization.
- const base::TimeDelta effective_connection_type_recomputation_interval_;
-
- // Time when the effective connection type was last computed.
- base::TimeTicks last_effective_connection_type_computation_;
-
// Intervals after the main frame request arrives at which accuracy of network
// quality prediction is recorded.
std::vector<base::TimeDelta> accuracy_recording_intervals_;
@@ -591,6 +588,18 @@ class NET_EXPORT NetworkQualityEstimator
// estimating the throughput.
std::unique_ptr<nqe::internal::ThroughputAnalyzer> throughput_analyzer_;
+ // Minimum duration between two consecutive computations of effective
+ // connection type. Set to non-zero value as a performance optimization.
+ const base::TimeDelta effective_connection_type_recomputation_interval_;
+
+ // Time when the effective connection type was last computed.
+ base::TimeTicks last_effective_connection_type_computation_;
+
+ // Number of RTT and bandwidth samples available when effective connection
+ // type was last recomputed.
+ size_t number_of_rtt_samples_at_last_ect_computation_;
+ size_t number_of_bandwidth_samples_at_last_ect_computation_;
RyanSturm 2016/08/08 23:57:01 nit: The naming of this variable is mouthful and h
tbansal1 2016/08/09 18:00:56 Done.
+
// Current effective connection type. It is updated on connection change
// events. It is also updated every time there is network traffic (provided
// the last computation was more than
« no previous file with comments | « no previous file | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698