Made ReadBurstLimit relative to read rate limit

This commit is contained in:
Xavi Ramirez 2017-07-18 19:53:25 +00:00
parent 3f42cb5e4a
commit 906f6b94fc

View file

@ -66,8 +66,8 @@ func withDefaults(config Config) Config {
if config.ReadRateLimit == 0 {
config.ReadRateLimit = 300
}
if config.ReadRateLimit == 0 {
config.ReadRateLimit = int(300 * 1.2)
if config.ReadBurstLimit == 0 {
config.ReadBurstLimit = int(float64(config.ReadRateLimit)*1.2 + 0.5)
}
if config.CheckpointFreq == 0 {