X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fsamplehold.h;h=6c992fdc35de2b34f9268b1f7b9745f9c83973a3;hp=5a554ef99fbacf464f6dae407d55ce56d75f1f8c;hb=762f4e00371f2a8e01a6cf60867f837b90460a60;hpb=0be9704d6b24d09ebd55beedec52758cb88c570b diff --git a/drl/samplehold.h b/drl/samplehold.h index 5a554ef..6c992fd 100644 --- a/drl/samplehold.h +++ b/drl/samplehold.h @@ -28,7 +28,13 @@ #define FLOW_DELETED 1 #define FLOW_USED 2 -#define RANDOM_GRANULARITY 1000 +#define RANDOM_GRANULARITY (1000) + +// FIXME: In reality, you probably don't want this higher than 5 +//#define SAMPLEHOLD_PERCENTAGE (5) +#define SAMPLEHOLD_PERCENTAGE (10) +#define SAMPLEHOLD_OVERFACTOR (10) +#define SAMPLEHOLD_BONUS_FACTOR (1.05) /** In-table representation of a flow that has been sampled. */ typedef struct sampled_flow {