Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
Check in docs for exec evenly
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonlal committed Dec 23, 2020
1 parent 5f96192 commit a23aca0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ The corresponding test case for this can be found in the following directory [Bl



## execEvenly and execEvenlyMinDelayMs
## execEvenly and execEvenlyMinDelayMs

The execute evenly ```execEvenly ``` indicates to the rate limiter to respond to the incoming requests in an even distrubtion over the duration. As an example
```
@RateLimit({
points: 5,
duration: 5,
execEvenlyMinDelayMs: 200,
execEvenly: true})
```

The above configuration will force the api to hold incoming requests and distribute the response evenly over the duration (i.e. 5 seconds). It will attempt to respond to each request every 200 milliseconds.

The controller that is used to demonstrate this is found in the following directory [ExecEvenlyController] (https://github.com/ozkanonur/nestjs-rate-limiter/examples/apps/rate-limiter-express-app/src/app/controllers/exec.controller.ts). This controler contains 2 different scenarios that demonstrate both how the execEvenly

The corresponding test case for this can be found in the following directory [Exec Evenly Tests](https://github.com/ozkanonur/nestjs-rate-limiter/examples/libs/rate-limiter-points-test/src/lib/rate-limiter-exec-evenly-test.ts)

0 comments on commit a23aca0

Please sign in to comment.