()
| 99 | } |
| 100 | |
| 101 | func (c *config) checkRunParameters() error { |
| 102 | if c.numConns < uint64(1) { |
| 103 | return errInvalidNumberOfConns |
| 104 | } |
| 105 | if c.testType() == counted && *c.numReqs < uint64(1) { |
| 106 | return errInvalidNumberOfRequests |
| 107 | } |
| 108 | if c.testType() == timed && *c.duration < time.Second { |
| 109 | return errInvalidTestDuration |
| 110 | } |
| 111 | return nil |
| 112 | } |
| 113 | |
| 114 | func (c *config) checkTimeoutDuration() error { |
| 115 | if c.timeout < 0 { |