echo

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const M = 10000

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cli.Command

func Run

func Run(ctx *cli.Context) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) OnClose

func (c *Handler) OnClose(socket *gws.Conn, err error)

func (*Handler) OnMessage

func (c *Handler) OnMessage(socket *gws.Conn, message *gws.Message)

func (*Handler) OnOpen

func (c *Handler) OnOpen(socket *gws.Conn)

func (*Handler) OnPing

func (c *Handler) OnPing(socket *gws.Conn, payload []byte)

func (*Handler) OnPong

func (c *Handler) OnPong(socket *gws.Conn, payload []byte)

func (*Handler) Report

func (c *Handler) Report(rate int) string

func (*Handler) SelectURL added in v1.0.14

func (c *Handler) SelectURL() string

func (*Handler) SendMessage added in v1.0.11

func (c *Handler) SendMessage(socket *gws.Conn, payload []byte)

func (*Handler) ShowProgress

func (c *Handler) ShowProgress()

type Params added in v1.0.14

type Params struct {
	Serial      int64     // 序列号
	Urls        []string  // 服务器地址列表
	Compress    bool      // 是否压缩
	Latency     bool      // 是否统计延迟
	PayloadSize int       // 载荷大小
	NumClient   int       // 客户端数量
	NumMessage  int64     // 消息数量
	Output      string    // 输出JSON文件目录
	Stats       [M]uint64 // 统计
	Payload     []byte    // 载荷
	Concurrency int       // 单连接并发度
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL