apptypes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2017 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutcomeText

func OutcomeText(outcome Outcome) string

OutcomeText //

func ReqEvtLabels added in v0.1.0

func ReqEvtLabels(reqEvt ReqEvt) string

ReqEvtLabels (best thing next to a constant array) //

Types

type Headers

type Headers map[string]string

Headers //

func (*Headers) Set

func (h *Headers) Set(value string) error

Set //

func (*Headers) String

func (h *Headers) String() string

type Outcome

type Outcome uint64

Outcome //

const (
	OutcomeSuccess Outcome = iota
	OutcomeError
)

Outcome constants //

type Report

type Report struct {
	ThreadID             uint64
	RequestID            uint64
	Outcome              Outcome
	Error                string
	Code                 uint64
	Response             string
	Compressed           bool
	Timings              []TimingEvent
	Timestamp            time.Time
	DurationMilliseconds float64
}

Report //

type ReqEvt

type ReqEvt string

ReqEvt is Request events type //

const (
	ReqEvtRequestStarted        ReqEvt = "request_started"
	ReqEvtGetConnection         ReqEvt = "get_connection"
	ReqEvtGotConnection         ReqEvt = "got_connection"
	ReqEvtGotFirstResponseByte  ReqEvt = "got_first_response_byte"
	ReqEvtGot100Continue        ReqEvt = "got_100_continue"
	ReqEvtDNSStart              ReqEvt = "dns_start"
	ReqEvtDNSDone               ReqEvt = "dns_done"
	ReqEvtConnectStart          ReqEvt = "connect_start"
	ReqEvtConnectDone           ReqEvt = "connect_done"
	ReqEvtTLSHandshakeStart     ReqEvt = "tls_handshake_start"
	ReqEvtTLSHandshakeDone      ReqEvt = "tls_handshake_done"
	ReqEvtWroteHeaders          ReqEvt = "wrote_headers"
	ReqEvtWait100Continue       ReqEvt = "wait_100_continue"
	ReqEvtWroteRequest          ReqEvt = "wrote_request"
	ReqEvtGotLastResponseByte   ReqEvt = "got_last_response_byte"
	ReqEvtRequestErrorOccurred  ReqEvt = "request_error_occurred"
	ReqEvtResponseErrorOccurred ReqEvt = "response_error_occurred"
)

Request Events Constants //

func ReqEvtList

func ReqEvtList() []ReqEvt

ReqEvtList (best thing next to a constant array) //

type Summary

type Summary struct {
	Timestamp time.Time
	Spec      TestSpec
	Reports   []Report
	Stats     SummaryStats
}

Summary //

type SummaryEventsAggregationsDetail added in v0.1.0

type SummaryEventsAggregationsDetail struct {
	Slowest float64
	Average float64
	Fastest float64
}

SummaryEventsAggregationsDetail //

type SummaryResponseTimesPercentiles added in v0.1.0

type SummaryResponseTimesPercentiles struct {
	Percentile10 float64
	Percentile25 float64
	Percentile50 float64
	Percentile75 float64
	Percentile90 float64
	Percentile95 float64
	Percentile99 float64
}

SummaryResponseTimesPercentiles //

type SummaryStats added in v0.0.2

type SummaryStats struct {
	Aggregations               SummaryStatsAggregations
	HTTPStatusCodeDistribution map[uint64]uint64
	ResponseTimesDistribution  []SummaryStatsResponseTimesDistributionSlot
	ResponseTimesPercentiles   SummaryResponseTimesPercentiles
	EventsAggregations         map[ReqEvt]*SummaryEventsAggregationsDetail
}

SummaryStats //

type SummaryStatsAggregations added in v0.0.2

type SummaryStatsAggregations struct {
	Count          uint64
	Errors         uint64
	ErrorsPercent  float64
	Total          float64
	Slowest        float64
	Fastest        float64
	Average        float64
	RequestsPerSec float64
}

SummaryStatsAggregations //

type SummaryStatsResponseTimesDistributionSlot added in v0.0.2

type SummaryStatsResponseTimesDistributionSlot struct {
	From  float64
	UpTo  float64
	Count uint64
}

SummaryStatsResponseTimesDistributionSlot //

type TestSpec

type TestSpec struct {
	TotalRequests     uint64  `yaml:"total_requests"`
	ConcurrentThreads uint64  `yaml:"concurrent_threads"`
	ReuseConnections  bool    `yaml:"reuse_connections"`
	RequestTimeout    uint64  `yaml:"request_timeout"`
	Method            string  `yaml:"method"`
	URL               string  `yaml:"url"`
	RequestHeaders    Headers `yaml:"request_headers"`
	Data              string  `yaml:"data"`
	Proxy             string  `yaml:"proxy"`
}

TestSpec //

func (TestSpec) Print

func (ts TestSpec) Print(logger *logrus.Logger) error

Print //

type TimingEvent

type TimingEvent struct {
	Name                  ReqEvt
	UnixNanoTimestamp     uint64
	TimestampMilliseconds float64
}

TimingEvent //

func (TimingEvent) String

func (te TimingEvent) String() string

Jump to

Keyboard shortcuts

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