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

Unified Diff: net/disk_cache/simple/simple_experiment.cc

Issue 2874833005: SimpleCache: read small files all at once. (Closed)
Patch Set: Add some metrics and an experiment knob. Not really happy with coverage, though. Created 3 years, 5 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: net/disk_cache/simple/simple_experiment.cc
diff --git a/net/disk_cache/simple/simple_experiment.cc b/net/disk_cache/simple/simple_experiment.cc
index 38ea589322f97df405f9b48bcaa349510847ce52..7b355f479d60c407ef0cef6cd78b510dbfaba5a1 100644
--- a/net/disk_cache/simple/simple_experiment.cc
+++ b/net/disk_cache/simple/simple_experiment.cc
@@ -9,6 +9,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_param_associator.h"
+#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
namespace disk_cache {
@@ -17,6 +18,10 @@ const base::Feature kSimpleSizeExperiment = {"SimpleSizeExperiment",
base::FEATURE_DISABLED_BY_DEFAULT};
const char kSizeMultiplierParam[] = "SizeMultiplier";
+const base::Feature kSimpleCachePrefetchExperiment = {
+ "GetSimpleCachePrefetchExperiment", base::FEATURE_DISABLED_BY_DEFAULT};
+const char kSimplePrefetchBytesParam[] = "Bytes";
+
namespace {
// Returns true if the experiment is found and properly defined.
@@ -61,4 +66,9 @@ SimpleExperiment GetSimpleExperiment(net::CacheType cache_type) {
return experiment;
}
+int GetSimpleCachePrefetchSize() {
+ return base::GetFieldTrialParamByFeatureAsInt(kSimpleCachePrefetchExperiment,
pasko 2017/07/18 14:02:57 please also add a test that sets the experiment pa
Maks Orlovich 2017/07/25 16:06:29 Done.
+ kSimplePrefetchBytesParam, 0);
+}
+
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698