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

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

Issue 2711473006: Add Precache.Fetch.MinWeight UMA. (Closed)
Patch Set: Track min_weight_fetched in unfinished_work, and add tests. Created 3 years, 9 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.
bengr 2017/02/24 20:58:54 Does this also range from 0.0 to 1.0 with higher v
twifkak 2017/02/25 01:13:40 Done.
26 optional double weight = 4;
jamartin 2017/02/24 21:23:29 This also depends on resource_weight_function, isn
jamartin 2017/02/24 21:23:29 I'm wondering if it makes sense to have distinct w
twifkak 2017/02/25 01:13:39 I don't think that's necessary. resource_weight_fu
twifkak 2017/02/25 01:13:39 Done.
23 }; 27 };
24 28
25 message PrecacheManifestId { 29 message PrecacheManifestId {
26 optional int64 id = 1; 30 optional int64 id = 1;
27 }; 31 };
28 32
29 // A manifest of cacheable resources to be precached for a specific host. 33 // A manifest of cacheable resources to be precached for a specific host.
30 message PrecacheManifest { 34 message PrecacheManifest {
31 // List of resources that we predict that the user will need if they are 35 // List of resources that we predict that the user will need if they are
32 // likely to fetch the host. 36 // likely to fetch the host.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // days, given that weight_ratio is a probability that a visit to the host 121 // days, given that weight_ratio is a probability that a visit to the host
118 // will request a resource, and host_visits is an estimate of the number of 122 // will request a resource, and host_visits is an estimate of the number of
119 // visits to the host in the next 30 days. 123 // visits to the host in the next 30 days.
120 FUNCTION_NAIVE = 0; 124 FUNCTION_NAIVE = 0;
121 // Models the probability of at least one request, given the same. 125 // Models the probability of at least one request, given the same.
122 FUNCTION_GEOMETRIC = 1; 126 FUNCTION_GEOMETRIC = 1;
123 }; 127 };
124 optional ResourceWeightFunction resource_weight_function = 11 128 optional ResourceWeightFunction resource_weight_function = 11
125 [default = FUNCTION_NAIVE]; 129 [default = FUNCTION_NAIVE];
126 }; 130 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698