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

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

Issue 2623553003: precache: Add geometric resource weight function. (Closed)
Patch Set: Add comments and tests. Created 3 years, 11 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;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // |total_resources_count| resource URLs are fetched. 98 // |total_resources_count| resource URLs are fetched.
99 optional uint32 total_resources_count = 7 [default = 999999]; 99 optional uint32 total_resources_count = 7 [default = 999999];
100 100
101 // The minimum visit-adjusted weight for which a resource will be downloaded. 101 // The minimum visit-adjusted weight for which a resource will be downloaded.
102 optional double min_weight = 8 [default = 0]; 102 optional double min_weight = 8 [default = 0];
103 103
104 // Whether to sort resources by weight, descending, before fetching. This 104 // Whether to sort resources by weight, descending, before fetching. This
105 // affects the fetcher's behavior with respect to max_bytes_total and 105 // affects the fetcher's behavior with respect to max_bytes_total and
106 // total_resources_count. 106 // total_resources_count.
107 optional bool global_ranking = 9 [default = false]; 107 optional bool global_ranking = 9 [default = false];
108
109 // The function to use to combine a resource's weight_ratio with its
110 // referring manifest's host_visits count to produce a final score.
111 enum ResourceWeightFunction {
112 // Models the expected number of requests for the resource in the next 30
113 // days, given that weight_ratio is a probability that a visit to the host
114 // will request a resource, and host_visits is an estimate of the number of
115 // visits to the host in the next 30 days.
116 FUNCTION_NAIVE = 0;
117 // Models the probability of at least one request, given the same.
118 FUNCTION_GEOMETRIC = 1;
119 };
120 optional ResourceWeightFunction resource_weight_function = 11
121 [default = FUNCTION_NAIVE];
108 }; 122 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698