blob: 8b44d5e2f6b8d0064ba33184333730062db92b9b [file] [log] [blame]
// 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;
// Information about the device the user is on.
message PageloadDeviceInfo {
// Kilobytes of total device memory.
optional int64 total_device_memory_kb = 1;
}
// 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;
// Added in M65.
optional PageloadDeviceInfo device_info = 3;
}
// Information about an attempted HTTPS Lite Page Redirect Preview.
message HTTPSLitePagePreviewInfo {
// The end result statuses. See
// //components/previews/content/previews_user_data.h for more detail.
enum Status {
UNKNOWN = 0;
SUCCESS = 1;
BYPASS = 2;
REDIRECT = 3;
FAILURE = 4;
CONTROL = 5;
};
// The end status of the attempted preview.
optional Status status = 1;
// The time spent restarting navigations before the final navigation began.
optional Duration navigation_restart_penalty = 2;
}
// Metrics for a single pageload.
message PageloadMetrics {
// Next ID: 35
reserved 3, 26;
// 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 possible conntion type values. See //net/base/network_change_notifier.h
// for a detailed description of the enum values.
enum ConnectionType {
CONNECTION_UNKNOWN = 0;
CONNECTION_ETHERNET = 1;
CONNECTION_WIFI = 2;
CONNECTION_2G = 3;
CONNECTION_3G = 4;
CONNECTION_4G = 5;
CONNECTION_NONE = 6;
CONNECTION_BLUETOOTH = 7;
};
// 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, but the URL/navigation was not
// blacklisted.
NONE = 0;
// Image placeholders were used on the page.
LOFI = 1;
// The main resource was a lite page.
LITE_PAGE = 2;
// Blacklisting rules caused no server preview to be requested. It's
// possible in the future that client previews might be shown when server
// previews are blacklisted, currently this is not possible.
CLIENT_BLACKLIST_PREVENTED_PREVIEW = 3;
}
// What type of crash occured on the page.
enum RendererCrashType {
// Reserved default value.
UNSPECIFIED = 0;
// No renderer crash happened on the page.
NO_CRASH = 1;
// A crash occured on the page, but the type is unknown. This is reported
// for all non-Android crashes and Android crashes that did not have their
// crash dump analyzed within 5 seconds of the crash.
NOT_ANALYZED = 2;
// Any other Android crash where the dump was successfully analyzed.
OTHER_CRASH = 3;
// A crash where the renderer ran out of memory on the page.
ANDROID_FOREGROUND_OOM = 4;
}
enum PageEndReason {
// Page lifetime has not yet ended (page is still active).
END_NONE = 0;
// The page was reloaded, possibly by the user.
END_RELOAD = 1;
// The page was navigated away from, via a back or forward navigation.
END_FORWARD_BACK = 2;
// The navigation is replaced with a navigation with the qualifier
// ui::PAGE_TRANSITION_CLIENT_REDIRECT, which is caused by Javascript, or
// the meta refresh tag.
END_CLIENT_REDIRECT = 3;
// If the page load is replaced by a new navigation. This includes link
// clicks, typing in the omnibox (not a reload), and form submissions.
END_NEW_NAVIGATION = 4;
// The page load was stopped (e.g. the user presses the stop X button).
END_STOP = 5;
// Page load ended due to closing the tab or browser.
END_CLOSE = 6;
// The provisional load for this page load failed before committing.
END_PROVISIONAL_LOAD_FAILED = 7;
// The render process hosting the page terminated unexpectedly.
END_RENDER_PROCESS_GONE = 8;
// We don't know why the page load ended. This is the value we assign to a
// terminated provisional load if the only signal we get is the load
// finished without committing, either without error or with
// net::ERR_ABORTED.
END_OTHER = 9;
}
// 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.
// Secure resources (i.e., HTTPS) that go into this sum are bucketed.
optional int64 original_page_size_bytes = 10;
// The sum of (compressed) content-length, over resources that were not loaded
// from browser cache.
// Secure resources (i.e., HTTPS) that go into this sum are bucketed.
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;
// The name of the finch group for the data reduction proxy holdback
// experiment. This can be an empty string if not included in a finch group.
optional string holdback_group = 19;
// Kilobytes of memory used by the main renderer process related to this page
// load. Recorded after load event starts. 0 if the page closed before or
// shortly after load event or the memory dump failed.
// Out of process frames will not be tracked in this estimate.
optional int64 renderer_memory_usage_kb = 20;
// The RendererCrashType for the page load.
optional RendererCrashType renderer_crash_type = 21;
// The percent of total_page_size_bytes that were loaded from the cache. This
// value is in the range [0.0, 1.0].
optional float cached_fraction = 22;
// The connection type (Wifi, 2G, 3G, 4G, None, etc) reported by the
// NetworkChangeNotifier.
optional ConnectionType connection_type = 23;
// The sum of all bytes loaded on a page. This is compressed_page_size_bytes
// plus the sum of content-length for all resources loaded from the browser
// cache. Secure resources (i.e., HTTPS) that go into this sum are bucketed.
optional int64 total_page_size_bytes = 24;
// The queuing delay for the first user input on the page.
optional Duration first_input_delay = 25;
// The time when the page load was ended.
optional Duration page_end_time = 27;
// The reason that the page load ended.
optional PageEndReason page_end_reason = 28;
// The number of touch events that happened on the page.
optional uint32 touch_count = 29;
// The number of scroll events that happened on the page.
optional uint32 scroll_count = 30;
// The release channel of this Chrome instance, e.g.: "stable", "beta", "dev",
// "canary", "unknown".
optional string channel = 31;
// The duration between the navigation start as reported by the navigation
// handle, and when the fetchStart of the main page HTML.
optional Duration navigation_start_to_main_frame_fetch_start = 32;
// The number of main frame redirects that occurred before commit.
optional uint32 redirect_count = 33;
// Information about an attempted HTTPS Lite Page Redirect Preview, if one was
// attempted.
optional HTTPSLitePagePreviewInfo https_litepage_info = 34;
}