Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #164 from cwaltken-edrans/156-remove-2m-limit-on-r…
Browse files Browse the repository at this point in the history
…equests

Increase request limit to MaxInt32
  • Loading branch information
zeph committed Aug 18, 2017
2 parents 14c7595 + e313185 commit 1d56f40
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions goad/goad.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ type CustomTask struct {
RunnerPath string
}

const nano = 1000000000
const (
MAX_REQUEST_COUNT = math.MaxInt32
nano = 1000000000
)

var supportedRegions = []string{
"us-east-1", // N. Virginia
Expand Down Expand Up @@ -170,8 +173,8 @@ func (c TestConfig) check() error {
if c.Concurrency < 1 || c.Concurrency > concurrencyLimit {
return fmt.Errorf("Invalid concurrency (use 1 - %d)", concurrencyLimit)
}
if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > 2000000 {
return errors.New("Invalid total requests (use 1 - 2000000)")
if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > MAX_REQUEST_COUNT {
return errors.New(fmt.Sprintf("Invalid total requests (use 1 - %d)", MAX_REQUEST_COUNT))
}
if c.Timelimit > 3600 {
return errors.New("Invalid maximum execution time in seconds (use 0 - 3600)")
Expand Down

0 comments on commit 1d56f40

Please sign in to comment.