| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto2"; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| import "client_config.proto"; |
| |
| package data_reduction_proxy; |
| |
| // Request message to record metrics for one or more pageloads. |
| message RecordPageloadMetricsRequest { |
| // The pageload metrics to record. |
| repeated PageloadMetrics pageloads = 1; |
| // Time metrics were sent. |
| optional Timestamp metrics_sent_time = 2; |
| } |
| |
| // Metrics for a single pageload. |
| message PageloadMetrics { |
| reserved 3; |
| |
| // The possible effective connection type values. |
| // See //net/nqe/effective_connection_type.h for the detailed description of |
| // each of the enum values. |
| enum EffectiveConnectionType { |
| EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0; |
| EFFECTIVE_CONNECTION_TYPE_OFFLINE = 1; |
| EFFECTIVE_CONNECTION_TYPE_SLOW_2G = 2; |
| EFFECTIVE_CONNECTION_TYPE_2G = 3; |
| EFFECTIVE_CONNECTION_TYPE_3G = 4; |
| EFFECTIVE_CONNECTION_TYPE_4G = 5; |
| }; |
| |
| // The various opt out states seen by server previews. |
| enum PreviewsOptOut { |
| // Set for non-previews navigations and app background navigations. |
| UNKNOWN = 0; |
| // Set for previews navigations that clicked "show original". |
| OPT_OUT = 1; |
| // Set for previews navigations that did not click "show original". |
| NON_OPT_OUT = 2; |
| } |
| |
| // The various server previews that can be shown. |
| enum PreviewsType { |
| // No server preview was applied. |
| NONE = 0; |
| // Image placeholders were used on the page. |
| LOFI = 1; |
| // The main resource was a lite page. |
| LITE_PAGE = 2; |
| } |
| |
| // The session key used to load the page. |
| optional string session_key = 1; |
| // The time at which the first request of the pageload was made, according to |
| // the client's clock. |
| optional Timestamp first_request_time = 2; |
| // The URL of the main page request. |
| optional string first_request_url = 4; |
| // The URL of the last request. |
| optional string last_request_url = 5; |
| |
| // Time to first contentful paint. |
| optional Duration time_to_first_contentful_paint = 6; |
| // Time to first image paint. |
| optional Duration time_to_first_image_paint = 7; |
| // Time to first byte. |
| optional Duration time_to_first_byte = 8; |
| // Time to onLoad event. |
| optional Duration page_load_time = 9; |
| |
| // The sum of original-content-length values, over resources that were not |
| // loaded from browser cache. |
| optional int64 original_page_size_bytes = 10; |
| // The sum of (compressed) content-length, over resources that were not loaded |
| // from browser cache. |
| optional int64 compressed_page_size_bytes = 11; |
| |
| // The effective connection type at the start of the navigation. |
| optional EffectiveConnectionType effective_connection_type = 12; |
| |
| // The amount of time the parser was blocked by loading script. |
| optional Duration parse_blocked_on_script_load_duration = 13; |
| |
| // Time until parsing finished. |
| optional Duration parse_stop = 14; |
| |
| // Time to first meaningful paint. This measure is unstable and will change |
| // over time. |
| optional Duration experimental_time_to_first_meaningful_paint = 15; |
| |
| // The unique identifier for the page load. |
| optional uint64 page_id = 16; |
| |
| // The opt out state of the page load. |
| optional PreviewsOptOut previews_opt_out = 17; |
| |
| // The previews type that was used on the page. |
| optional PreviewsType previews_type = 18; |
| } |