punchclock icon indicating copy to clipboard operation
punchclock copied to clipboard

feature: extend the OperationQueue by adding support for randomness

Open gsgou opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. I want to add jittering (noise) to my http-request-queues for a specific endpoint. Discovered Fusillade and it would be awesome to have this on OperationQueue.

Describe the solution you'd like Trying to improve the performance of a system by adding randomness, as well as trying to avoid limiting of some endpoint that requires noise.

Describe alternatives you've considered Set maximumConcurrent to 1 and use:

Observable
    .Return(Unit.Default)
    .Delay(TimeSpan.FromMilliseconds(new Random().Next(min, max)))

gsgou avatar Apr 26 '20 18:04 gsgou

Probably would want to store the Random instance away so we don't alloc every time but seems reasonable.

glennawatson avatar Apr 28 '20 01:04 glennawatson