X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drl%2Fsamplehold.h;h=fbd8d3d55b66f31b80df93ac63bf386df23b8d08;hb=415f6940d383c7a99d688ecfe3c6376784a3061c;hp=5a554ef99fbacf464f6dae407d55ce56d75f1f8c;hpb=0be9704d6b24d09ebd55beedec52758cb88c570b;p=distributedratelimiting.git diff --git a/drl/samplehold.h b/drl/samplehold.h index 5a554ef..fbd8d3d 100644 --- a/drl/samplehold.h +++ b/drl/samplehold.h @@ -28,7 +28,15 @@ #define FLOW_DELETED 1 #define FLOW_USED 2 -#define RANDOM_GRANULARITY 1000 +#define RANDOM_GRANULARITY (1000) + +/* For simple S&H testing. */ +#define SAMPLEHOLD_PERCENTAGE (5) +#define SAMPLEHOLD_OVERFACTOR (1.25) + +//#define SAMPLEHOLD_PERCENTAGE (5) +//#define SAMPLEHOLD_OVERFACTOR (10) +#define SAMPLEHOLD_BONUS_FACTOR (1.05) /** In-table representation of a flow that has been sampled. */ typedef struct sampled_flow {