From c6f74709b9493c3d6456507f566c5c52c9f9fc5a Mon Sep 17 00:00:00 2001 From: Genevieve Helsel Date: Wed, 30 Jun 2021 14:56:26 -0700 Subject: [PATCH] store file access logging percentage as a denominator Reviewed By: chadaustin Differential Revision: D29475156 fbshipit-source-id: efe207f1a4a09d4a718b9392294dbb7e91a2b98f --- eden/fs/config/EdenConfig.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eden/fs/config/EdenConfig.h b/eden/fs/config/EdenConfig.h index 44f3905605..861a278b08 100644 --- a/eden/fs/config/EdenConfig.h +++ b/eden/fs/config/EdenConfig.h @@ -615,13 +615,15 @@ class EdenConfig : private ConfigSettingManager { this}; /** - * A number from 0 - 100 to determine how often we should log file access + * A number from 0 - x to determine how often we should log file access * events. This is currectly agnostic to the type of file access. If this - * is not at 100, we will not log filenames and we will only log directory - * paths + * is not at 100%, we will not log filenames and we will only log directory + * paths. In the following equation, 1/x = percentage, x is this variable. + * For 50% rollout, 1/x = .5, so x = 2, so this would be set to 2. 0 + * indicates that the feature is off. */ - ConfigSetting logFileAccessesPercentage{ - "prefetch-profiles:file-access-logging-percentage", + ConfigSetting logFileAccessesSamplingDenominator{ + "prefetch-profiles:file-access-logging-sampling-denominator", 0, this};