blob: 976093e0273b97152472bb5465fbf8e6eec9b9a8 [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;
}
// Metrics for a single pageload.
message PageloadMetrics {
// Next ID: 22
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;
}
// 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;
}
// 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;
// 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;
}