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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: components/precache/core/proto/precache.proto
diff --git a/components/precache/core/proto/precache.proto b/components/precache/core/proto/precache.proto
index f5124bcc2d3bcb8f288cd9fb93ec36895edd90e5..f9de162a9ac88fd88d8fc63501b1fdbff6c7bd6a 100644
--- a/components/precache/core/proto/precache.proto
+++ b/components/precache/core/proto/precache.proto
@@ -105,4 +105,18 @@ message PrecacheConfigurationSettings {
// affects the fetcher's behavior with respect to max_bytes_total and
// total_resources_count.
optional bool global_ranking = 9 [default = false];
+
+ // The function to use to combine a resource's weight_ratio with its
+ // referring manifest's host_visits count to produce a final score.
+ enum ResourceWeightFunction {
+ // Models the expected number of requests for the resource in the next 30
+ // days, given that weight_ratio is a probability that a visit to the host
+ // will request a resource, and host_visits is an estimate of the number of
+ // visits to the host in the next 30 days.
+ FUNCTION_NAIVE = 0;
+ // Models the probability of at least one request, given the same.
+ FUNCTION_GEOMETRIC = 1;
+ };
+ optional ResourceWeightFunction resource_weight_function = 11
+ [default = FUNCTION_NAIVE];
};

Powered by Google App Engine
This is Rietveld 408576698