exec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPCommand

func NewHTTPCommand(cmd *config.Command) routine.Executor

NewHTTPCommand new

func NewShellCommand

func NewShellCommand(cmd *config.Command) routine.Executor

NewShellCommand new

func TransportFrom

func TransportFrom(ctx context.Context) (http.RoundTripper, bool)

TransportFrom context

func WithTransport

func WithTransport(ctx context.Context, tr http.RoundTripper) context.Context

WithTransport context

Types

type Bucket

type Bucket struct {
	Mark      float64
	Count     int
	Frequency float64
}

type HTTPCommand

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

HTTPCommand struct

func (*HTTPCommand) Execute

func (h *HTTPCommand) Execute(ctx context.Context) error

Execute of HTTPCommand

type Job

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

Job struct instance of job

func NewJob

func NewJob(jd *config.JD, rpt *Reporter) *Job

NewJob new job

func (*Job) Execute

func (j *Job) Execute(ctx context.Context) error

Execute implement executor

func (*Job) ID

func (j *Job) ID() string

ID string

func (*Job) String

func (j *Job) String() string

String

type LatencyDistribution

type LatencyDistribution struct {
	Percentage int
	Latency    float64
}

type ReportData

type ReportData struct {
	AvgTotal float64
	Fastest  float64
	Slowest  float64
	Average  float64
	Ops      float64

	AvgDelay float64
	DelayMax float64
	DelayMin float64

	Lats    []float64
	Offsets []float64
	Codes   []int

	Uptime time.Duration
	Total  time.Duration

	ErrorDist map[string]int
	CodeDist  map[int]int
	SizeTotal int64
	SuccTotal int64
	NumRes    int64

	LatencyDistribution []LatencyDistribution
	Histogram           []Bucket
}

type Reporter

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

func NewReporter

func NewReporter(n int) *Reporter

func (*Reporter) Execute

func (r *Reporter) Execute(ctx context.Context) error

func (*Reporter) Finalize

func (r *Reporter) Finalize()

func (*Reporter) Report

func (r *Reporter) Report() chan *routine.Result

func (*Reporter) Stop

func (r *Reporter) Stop()

type ShellCommand

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

ShellCommand struct

func (*ShellCommand) Execute

func (sh *ShellCommand) Execute(ctx context.Context) error

Execute of ShellCommand

type StatusCode

type StatusCode int

StatusCode int

func (StatusCode) String

func (status StatusCode) String() string

String StatusCode

func (StatusCode) Value

func (status StatusCode) Value() int32

Value StatusCode

Jump to

Keyboard shortcuts

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