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

Unified Diff: net/nqe/network_quality_estimator_test_util.h

Issue 2710973003: Record RTT prediction accuracy when using average algorithms (Closed)
Patch Set: Add unweighted average Created 3 years, 10 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 | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator_test_util.h
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h
index 64770daf5fd2596ddc4abfab1d2ca35c2e719d13..4718a47786e617f245aa4eed048a5c949ac85864 100644
--- a/net/nqe/network_quality_estimator_test_util.h
+++ b/net/nqe/network_quality_estimator_test_util.h
@@ -168,6 +168,20 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator {
bool GetRecentDownlinkThroughputKbps(const base::TimeTicks& start_time,
int32_t* kbps) const override;
+ // Returns the recent HTTP RTT value that was set using
+ // |set_rtt_estimate_internal|. If it has not been set, then the base
+ // implementation is called.
+ base::TimeDelta GetRTTEstimateInternal(
+ const std::vector<NetworkQualityObservationSource>&
+ disallowed_observation_sources,
+ base::TimeTicks start_time,
+ const base::Optional<NetworkQualityEstimator::Statistic>& statistic,
+ int percentile) const override;
+
+ void set_rtt_estimate_internal(base::TimeDelta value) {
+ rtt_estimate_internal_ = value;
+ }
+
void SetAccuracyRecordingIntervals(
const std::vector<base::TimeDelta>& accuracy_recording_intervals);
@@ -234,6 +248,9 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator {
base::Optional<int32_t> start_time_null_downlink_throughput_kbps_;
base::Optional<int32_t> recent_downlink_throughput_kbps_;
+ // If set, GetRTTEstimateInternal() would return the set value.
+ base::Optional<base::TimeDelta> rtt_estimate_internal_;
+
double rand_double_;
LocalHttpTestServer embedded_test_server_;
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698