Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicController ¶
type BasicController struct { // 并发数, 必须指定 Concurrency int // 总请求数 Count int // 总运行时间 Period time.Duration // 请求 Requests []interface{} }
func (*BasicController) Control ¶
func (c *BasicController) Control(runner req.Runner, reporter Reporter)
func (*BasicController) String ¶
func (c *BasicController) String() string
type Controller ¶
type Reporter ¶
type Reporter interface { // 结果流式处理: 存盘, 抽样统计 StreamReport(report *req.ReportV1) // ResultReport(interface{}) // 渲染自己, 最后自己就是结果. Result(print bool) }
通过不同的策略, 去实现不同的抽样.
type Statistic ¶
type Statistic struct { WriterCSV io.WriteCloser Filter func(v1 *req.ReportV1) bool // 抽样方法 SampleReservoir int ReservoirIndex int TP []int // contains filtered or unexported fields }
func (*Statistic) ResultReport ¶
func (s *Statistic) ResultReport(result interface{})
func (*Statistic) StreamReport ¶
Click to show internal directories.
Click to hide internal directories.