Documentation ¶
Index ¶
- Constants
- Variables
- func PrintDebugf(format string, args ...interface{})
- type BootstrapTask
- type CLI
- type Checker
- type Ctx
- type Driver
- type Helper
- type InitTask
- type LoadCheckerTask
- type LoadTask
- type Master
- type ResponseCounter
- type Result
- type Session
- type Task
- type UserSchema
- type UserSchemas
- type Violation
- type WorkOrder
- type Worker
Constants ¶
View Source
const ( ExitCodeOK = 0 // Specific error codes. begin 10- ExitCodeError = 10 + iota ExitCodeParseError ExitCodeInvalidArgsError )
Exit codes. used only in Run()
Variables ¶
View Source
var ( // failed create session errors ErrNotFoundSession = errors.New("not found session") ErrFailedReadFile = errors.New("failed to read file") ErrFailedParseJson = errors.New("failed to parse json") )
View Source
var ( // ErrParseFailed is failed to cli args parse ErrParseFailed = errors.New("failed to parse args") )
Functions ¶
func PrintDebugf ¶
func PrintDebugf(format string, args ...interface{})
PrintDebugf behaves like log.Printf only in the debug env
Types ¶
type BootstrapTask ¶
type BootstrapTask struct {
// contains filtered or unexported fields
}
BootstrapTask checks initial content consistency
func (*BootstrapTask) FinishHook ¶
func (t *BootstrapTask) FinishHook(r Result) Result
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker is check benchmark response
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
Ctx is environment settings in each Worker
type LoadCheckerTask ¶
type LoadCheckerTask struct {
// contains filtered or unexported fields
}
Make load and check request. NOT SUPPORT CONCURRENCY
func (*LoadCheckerTask) FinishHook ¶
func (t *LoadCheckerTask) FinishHook(r Result) Result
type LoadTask ¶
type LoadTask struct {
// contains filtered or unexported fields
}
Make load request. support concurrency
func (*LoadTask) FinishHook ¶
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master is manages the benchmark
type ResponseCounter ¶
type ResponseCounter struct { Success int `json:"success"` // 2xx Redirect int `json:"redirect"` // 3xx ClientError int `json:"client_error"` // 4xx ServerError int `json:"server_error"` // 5xx Exception int `json:"exception"` // failed request(for example, timeout) // contains filtered or unexported fields }
ResponseCounter holds results for each benchmark
type Result ¶
type Result struct { Valid bool `json:"valid"` RequestCount int `json:"request_count"` ElapsedTime int64 `json:"elapsed_time"` Response *ResponseCounter `json:"response"` Violations []*Violation `json:"violations"` // contains filtered or unexported fields }
Result is save benchmark results
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is save cookies
type UserSchema ¶
type UserSchemas ¶
type UserSchemas struct {
Parameters []UserSchema
}
UserSchema represents the user column userd in the request
type Violation ¶
type Violation struct { RequestName string `json:"request_type"` Cause string `json:"description"` Count int `json:"num"` }
Violation is save failed requests with cause
Source Files ¶
Click to show internal directories.
Click to hide internal directories.