Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: components/precache/core/proto/precache.proto

Issue 2711473006: Add Precache.Fetch.MinWeight UMA. (Closed)
Patch Set: Comment clarifications. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 syntax = "proto2"; 5 syntax = "proto2";
6 6
7 package precache; 7 package precache;
8 8
9 // Chrome requires this. 9 // Chrome requires this.
10 option optimize_for = LITE_RUNTIME; 10 option optimize_for = LITE_RUNTIME;
11 11
12 // Information about a cacheable resource to be precached. 12 // Information about a cacheable resource to be precached.
13 message PrecacheResource { 13 message PrecacheResource {
14 // The URL of the resource. This field must always be present. 14 // The URL of the resource. This field must always be present.
15 optional string url = 1; 15 optional string url = 1;
16 16
17 // The tophost this resource corresponds to. 17 // The tophost this resource corresponds to.
18 optional string top_host_name = 2; 18 optional string top_host_name = 2;
19 19
20 // How important this resource is for the host. It ranges from 0.0 to 1.0. 20 // How important this resource is for the host. It ranges from 0.0 to 1.0.
21 // Higher values mean more important. 21 // Higher values mean more important.
22 optional double weight_ratio = 3; 22 optional double weight_ratio = 3;
23
24 // How important this resource is for the client; a combination of
25 // weight_ratio and TopHost.visits. Populated only in PrecacheUnfinishedWork.
26 // This is a non-negative number, with higher being more important. Its value
27 // depends on PrecacheConfigurationSettings.resource_weight_function.
28 optional double weight = 4;
23 }; 29 };
24 30
25 message PrecacheManifestId { 31 message PrecacheManifestId {
26 optional int64 id = 1; 32 optional int64 id = 1;
27 }; 33 };
28 34
29 // A manifest of cacheable resources to be precached for a specific host. 35 // A manifest of cacheable resources to be precached for a specific host.
30 message PrecacheManifest { 36 message PrecacheManifest {
31 // List of resources that we predict that the user will need if they are 37 // List of resources that we predict that the user will need if they are
32 // likely to fetch the host. 38 // likely to fetch the host.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // days, given that weight_ratio is a probability that a visit to the host 135 // days, given that weight_ratio is a probability that a visit to the host
130 // will request a resource, and host_visits is an estimate of the number of 136 // will request a resource, and host_visits is an estimate of the number of
131 // visits to the host in the next 30 days. 137 // visits to the host in the next 30 days.
132 FUNCTION_NAIVE = 0; 138 FUNCTION_NAIVE = 0;
133 // Models the probability of at least one request, given the same. 139 // Models the probability of at least one request, given the same.
134 FUNCTION_GEOMETRIC = 1; 140 FUNCTION_GEOMETRIC = 1;
135 }; 141 };
136 optional ResourceWeightFunction resource_weight_function = 11 142 optional ResourceWeightFunction resource_weight_function = 11
137 [default = FUNCTION_NAIVE]; 143 [default = FUNCTION_NAIVE];
138 }; 144 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698