exec

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 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
}

Bucket struct

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
}

LatencyDistribution struct

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
}

ReportData struct

type Reporter

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

Reporter struct

func NewReporter

func NewReporter(n int) *Reporter

NewReporter new

func (*Reporter) Execute

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

Execute impl executor

func (*Reporter) Finalize

func (r *Reporter) Finalize()

Finalize end

func (*Reporter) Report

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

Report chan

func (*Reporter) Stop

func (r *Reporter) Stop()

Stop reporter

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