Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultStress = Stress{ // contains filtered or unexported fields }
DefaultStress 默认压测对象
Functions ¶
This section is empty.
Types ¶
type Stress ¶
type Stress struct {
// contains filtered or unexported fields
}
Stress 压测结构体
func NewStress ¶
func NewStress(customerNum, requestNum, cpuNum, step int, stepTime, rSpaceTime, testTime time.Duration) *Stress
NewStress 创建压测对象
customerNum -> 初始开启线程数 requestNum -> 每个线程请求次数,0 表示一直请求 cpuNum -> 使用CPU核心数 step -> 每次增加多少线程 stepTime -> 每次增线程时间间隔 rSpaceTime -> 每个线程中每次请求时间间隔 testTime -> 压测总时间 0 表示一直压测
Click to show internal directories.
Click to hide internal directories.