Documentation
¶
Index ¶
Constants ¶
View Source
const ( NanoSecond string = "ns" MicroSecond string = "mms" MilliSecond string = "ms" Second string = "s" NanoSecondDivisor int64 = 1 MicroSecondDivisor int64 = 1000 * NanoSecondDivisor MilliSecondDivisor int64 = 1000 * MicroSecondDivisor SecondDivisor int64 = 1000 * MilliSecondDivisor )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion interface {
Assert(resp HttpResponse) (bool, string)
Name() string
Validate() error
}
type HttpResponse ¶
type JsonPathAssertion ¶
type JsonPathAssertion struct {
Expression string
// contains filtered or unexported fields
}
func (JsonPathAssertion) Assert ¶
func (a JsonPathAssertion) Assert(resp HttpResponse) (bool, string)
func (JsonPathAssertion) Name ¶
func (a JsonPathAssertion) Name() string
func (*JsonPathAssertion) Validate ¶
func (a *JsonPathAssertion) Validate() error
type Plan ¶
type RegexAssertion ¶
type RegexAssertion struct {
Expression string
}
func (RegexAssertion) Assert ¶
func (r RegexAssertion) Assert(resp HttpResponse) (bool, string)
func (RegexAssertion) Name ¶
func (r RegexAssertion) Name() string
func (RegexAssertion) Validate ¶
func (r RegexAssertion) Validate() error
type SimpleListener ¶
type SimpleListener struct {
// contains filtered or unexported fields
}
func BuildSimpleListener ¶
func BuildSimpleListener(capacity int, timeunit string) SimpleListener
func (*SimpleListener) OnPlanFinished ¶
func (s *SimpleListener) OnPlanFinished() Report
func (s *SimpleListener) OnWorkerFinished(workerID int) { }
func (*SimpleListener) OnRequestFinished ¶
func (s *SimpleListener) OnRequestFinished(summary Summary)
func (*SimpleListener) OnStart ¶
func (s *SimpleListener) OnStart()
func (*SimpleListener) PrintToStdOut ¶
func (s *SimpleListener) PrintToStdOut()
type StatusCodeAssertion ¶
type StatusCodeAssertion struct {
ExpectedCodes []int
}
func (StatusCodeAssertion) Assert ¶
func (a StatusCodeAssertion) Assert(resp HttpResponse) (bool, string)
func (StatusCodeAssertion) Name ¶
func (a StatusCodeAssertion) Name() string
func (StatusCodeAssertion) Validate ¶
func (a StatusCodeAssertion) Validate() error
type Summary ¶
type Summary struct {
// StartTimeOfAll time.Time
StartTime time.Time
EndTime time.Time
// EndTimeOfAll time.Time
StatusCode int
Success bool
FailedAssertion string
FailedCause string
HasError bool
}
Summary for single http request
type TaskDef ¶
type TaskDef struct {
Loop int
Concurrency int
Timeout time.Duration
// KeepAlive bool
URL string
Method string
Headers []string
Body string
TimeUnit string
DisableBar bool
PrintError bool
Insecure bool
}
func (TaskDef) PrintToStdOut ¶
func (d TaskDef) PrintToStdOut()
Click to show internal directories.
Click to hide internal directories.