diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-21 01:45:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-21 01:45:56 +0700 |
| commit | e8d3716995e9229a61a32894689c379e22475420 (patch) | |
| tree | 9c20154a220d9110cd09574fe0092e62e3fac8eb /attack_options.go | |
| parent | f8b6b66d9b407f7441a9170b46e42d928532f732 (diff) | |
| download | gorankusu-e8d3716995e9229a61a32894689c379e22475420.tar.xz | |
all: move constants declaration closer to its usage
Diffstat (limited to 'attack_options.go')
| -rw-r--r-- | attack_options.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/attack_options.go b/attack_options.go index 6f53613..369afef 100644 --- a/attack_options.go +++ b/attack_options.go @@ -9,6 +9,19 @@ import ( vegeta "github.com/tsenart/vegeta/v12/lib" ) +// DefaultAttackDuration define default attack duration per Target. +// This is default value for [AttackOptions.Duration]. +const DefaultAttackDuration = 10 * time.Second + +// DefaultAttackRatePerSecond define default attack rate per second per +// Target. +// This is default value for [AttackOptions.RatePerSecond]. +const DefaultAttackRatePerSecond = 500 + +// DefaultAttackTimeout define default timeout for each attack request. +// This is default value for [AttackOptions.Timeout]. +const DefaultAttackTimeout = 30 * time.Second + // AttackOptions define the options for attacking HTTP endpoint. type AttackOptions struct { // Duration define the duration for each attack to be executed, |
