1 // Copyright 2016 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_NQE_NETWORK_QUALITY_OBSERVATION_SOURCE_H_ 6 #define NET_NQE_NETWORK_QUALITY_OBSERVATION_SOURCE_H_ 7 8 namespace net { 9 10 // On Android, a Java counterpart will be generated for this enum. 11 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net 12 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: NetworkQualityObservationSource 13 // GENERATED_JAVA_PREFIX_TO_STRIP: NETWORK_QUALITY_OBSERVATION_SOURCE_ 14 enum NetworkQualityObservationSource { 15 // The observation was taken at the request layer, e.g., a round trip time 16 // is recorded as the time between the request being sent and the first byte 17 // being received. 18 NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP = 0, 19 20 // The observation is taken from TCP statistics maintained by the kernel. 21 NETWORK_QUALITY_OBSERVATION_SOURCE_TCP = 1, 22 23 // The observation is taken at the QUIC layer. 24 NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC = 2, 25 26 // The observation is a previously cached estimate of the metric. The metric 27 // was computed at the HTTP layer. 28 NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP_CACHED_ESTIMATE = 3, 29 30 // The observation is derived from network connection information provided 31 // by the platform. For example, typical RTT and throughput values are used 32 // for a given type of network connection. The metric was provided for use 33 // at the HTTP layer. 34 NETWORK_QUALITY_OBSERVATION_SOURCE_DEFAULT_HTTP_FROM_PLATFORM = 4, 35 36 // The observation came from a Chromium-external source. The metric was 37 // computed by the external source at the HTTP layer. 38 // Deprecated since external estimate provider is not currently queried. 39 DEPRECATED_NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP_EXTERNAL_ESTIMATE = 5, 40 41 // The observation is a previously cached estimate of the metric. The metric 42 // was computed at the transport layer. 43 NETWORK_QUALITY_OBSERVATION_SOURCE_TRANSPORT_CACHED_ESTIMATE = 6, 44 45 // The observation is derived from the network connection information provided 46 // by the platform. For example, typical RTT and throughput values are used 47 // for a given type of network connection. The metric was provided for use 48 // at the transport layer. 49 NETWORK_QUALITY_OBSERVATION_SOURCE_DEFAULT_TRANSPORT_FROM_PLATFORM = 7, 50 51 // Round trip ping latency reported by H2 connections. 52 NETWORK_QUALITY_OBSERVATION_SOURCE_H2_PINGS = 8, 53 54 NETWORK_QUALITY_OBSERVATION_SOURCE_MAX, 55 }; 56 57 namespace nqe::internal { 58 59 // Different categories to which an observation source can belong to. Each 60 // observation source belongs to exactly one category. 61 enum ObservationCategory { 62 // HTTP RTT observations measure the RTT from this device taken at the 63 // HTTP layer. If a HTTP-layer proxy is in use, then the RTT observations 64 // would measure the RTT from this device to the proxy. 65 OBSERVATION_CATEGORY_HTTP = 0, 66 // Transport RTT observations measure the RTT from this device taken at the 67 // transport layer. If a transport-layer proxy (e.g., TCP proxy) is in use, 68 // then the RTT observations would measure the RTT from this device to the 69 // proxy. 70 OBSERVATION_CATEGORY_TRANSPORT = 1, 71 // End to end RTT observations measure the RTT from this device to the remote 72 // web server. Currently, this only includes RTT observations taken from the 73 // QUIC connections. 74 OBSERVATION_CATEGORY_END_TO_END = 2, 75 OBSERVATION_CATEGORY_COUNT = 3 76 }; 77 78 } // namespace nqe::internal 79 80 } // namespace net 81 82 #endif // NET_NQE_NETWORK_QUALITY_OBSERVATION_SOURCE_H_ 83