tcp

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultTmpl = `` /* 379-byte string literal not displayed */

)

Functions

This section is empty.

Types

type TCPBuilder

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

func NewBuilder

func NewBuilder() *TCPBuilder

func (*TCPBuilder) CreateTask

func (builder *TCPBuilder) CreateTask(configArgs *config.ProtoConfigArgs) (string, error)

func (*TCPBuilder) Destroy

func (builder *TCPBuilder) Destroy(obj interface{}) error

func (*TCPBuilder) Done

func (builder *TCPBuilder) Done(total time.Duration) (interface{}, error)

func (*TCPBuilder) Init

func (builder *TCPBuilder) Init(ctx context.Context, taskReq *pb.ExecuteTaskRequest) error

func (*TCPBuilder) Merge

func (builder *TCPBuilder) Merge(messages []string) (interface{}, error)

func (*TCPBuilder) PostRequest

func (builder *TCPBuilder) PostRequest(result interface{}) error

func (*TCPBuilder) PreRequest

func (builder *TCPBuilder) PreRequest(taskReq *pb.ExecuteTaskRequest) (interface{}, interface{})

func (*TCPBuilder) Request

func (builder *TCPBuilder) Request(ctx context.Context, obj interface{}, taskReq *pb.ExecuteTaskRequest) interface{}

func (*TCPBuilder) Split

func (builder *TCPBuilder) Split(request *pb.ExecuteTaskRequest, count int) []*pb.ExecuteTaskRequest

type TCPOptions

type TCPOptions struct {
	Addr        string
	Requests    int
	Concurrency int
	Timeout     int
	Duration    int
	MsgLength   int
	MaxResults  int
}

func NewTCPOptions

func NewTCPOptions() *TCPOptions

func (*TCPOptions) Validate

func (tcpOptions *TCPOptions) Validate(args []string) error

type TCPStats

type TCPStats struct {
	TotalSize      int64             `json:"totalSize,omitempty"`
	Rps            float64           `json:"rps,omitempty"`
	Duration       float64           `json:"duration,omitempty"`
	TotalDuration  float64           `json:"totalDuration,omitempty"`
	Requests       int64             `json:"requests,omitempty"`
	TotalRequests  int64             `json:"totalRequests,omitempty"`
	TotalResponses int64             `json:"totalResponses,omitempty"`
	AvgSize        int64             `json:"avgSize,omitempty"`
	ErrMap         map[string]uint32 `json:"errMap,omitempty"`
}

Jump to

Keyboard shortcuts

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