Include all dupe types (event when value is zero) in scan stats.
[chromium-blink-merge.git] / net / base / network_quality.h
blob4e2985776e0f4a8430b80c7523751391b4b0c0b7
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_BASE_NETWORK_QUALITY_H_
6 #define NET_BASE_NETWORK_QUALITY_H_
8 #include <stdint.h>
10 #include "base/time/time.h"
12 namespace net {
14 // API that is used to report the current network quality as estimated by the
15 // NetworkQualityEstimator.
16 struct NET_EXPORT_PRIVATE NetworkQuality {
17 NetworkQuality(const base::TimeDelta& fastest_rtt,
18 double fastest_rtt_confidence,
19 uint64_t peak_throughput_kbps,
20 double peak_throughput_kbps_confidence)
21 : fastest_rtt(fastest_rtt),
22 fastest_rtt_confidence(fastest_rtt_confidence),
23 peak_throughput_kbps(peak_throughput_kbps),
24 peak_throughput_kbps_confidence(peak_throughput_kbps_confidence) {}
26 ~NetworkQuality() {}
28 // The fastest round trip time observed for the current connection.
29 const base::TimeDelta fastest_rtt;
31 // Confidence of the |fastest_rtt| estimate. Value lies between 0.0 and 1.0
32 // with 0.0 being no confidence and 1.0 implying that estimates are same as
33 // ground truth.
34 // TODO(tbansal): Define units so values intermediate between 0.0 and 1.0 are
35 // meaningful.
36 const double fastest_rtt_confidence;
38 // Peak throughput in Kbps observed for the current connection.
39 const uint64_t peak_throughput_kbps;
41 // Confidence of the |peak_throughput_kbps| estimate. Value lies between 0.0
42 // and 1.0 with 0.0 being no confidence and 1.0 implying that estimates are
43 // same as ground truth.
44 // TODO(tbansal): Define units so values intermediate between 0.0 and 1.0 are
45 // meaningful.
46 const double peak_throughput_kbps_confidence;
49 } // namespace net
51 #endif // NET_BASE_NETWORK_QUALITY_H_