Add --req-time-cost

This commit is contained in:
Piero Toffanin 2024-02-05 15:03:27 -05:00
parent fa24655404
commit b522a0f763
3 changed files with 31 additions and 4 deletions

View file

@ -63,6 +63,13 @@ def get_args():
metavar="<number>",
help="Set the maximum number of request limit offences that a client can exceed before being banned. (%(default)s)",
)
parser.add_argument(
"--req-time-cost",
default=DEFARGS['REQ_TIME_COST'],
type=int,
metavar="<number>",
help="Considers a time cost (in seconds) for request limiting purposes. If a request takes 10 seconds and this value is set to 5, the request cost is either 2 or the actual request cost (whichever is greater). (%(default)s)",
)
parser.add_argument(
"--batch-limit",
default=DEFARGS['BATCH_LIMIT'],