Documentation
¶
Index ¶
- Constants
- Variables
- type Agent
- type AgentOptions
- type DBConfig
- type DBDriver
- type DBIface
- type DSN
- type Data
- type DataOptions
- type DataPoint
- type DataPointWithErr
- type JSONDuration
- type NullDB
- type Options
- type Progress
- type QPSSet
- type Recorder
- func (rec *Recorder) Add(dpes []DataPointWithErr)
- func (rec *Recorder) Close()
- func (rec *Recorder) CountAll() int
- func (rec *Recorder) CountSuccess() int
- func (rec *Recorder) DataPoints() []DataPoint
- func (rec *Recorder) ErrorQueryCount() int
- func (rec *Recorder) Report() *Report
- func (rec *Recorder) Start()
- type Report
- type TTY
- type Task
- type ZstdFile
Constants ¶
View Source
const (
InterimReportIntvl = 1 * time.Second
)
View Source
const (
RecIntvl = 1 * time.Second
)
Variables ¶
View Source
var ( // End of data ErrEOD = errors.New("EOD") )
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
*AgentOptions
ID string
// contains filtered or unexported fields
}
type AgentOptions ¶
type AgentOptions struct {
Force bool `kong:"negatable,default='false',help='Do not abort test on error. (default: disabled)'"`
}
type DBConfig ¶
type DBConfig struct {
DSN DSN `` /* 266-byte string literal not displayed */
Driver DBDriver `kong:"-"`
Noop bool `kong:"negatable,default='false',help='No-op mode. No actual query execution. (default: disabled)'"`
IAMAuth bool `kong:"negatable,default='false',help='Use RDS IAM authentication.'"`
NullDBOut io.Writer `json:"-" kong:"-"`
}
type Data ¶
type Data struct {
*DataOptions
// contains filtered or unexported fields
}
type DataOptions ¶
type DataOptions struct {
DataFiles []string `kong:"short='f',required,help='JSON Lines file list of queries to execute.'"`
Key string `kong:"default='q',help='Key name of the query field in the test data. e.g. {\"q\":\"SELECT ...\"}'"`
Loop bool `kong:"negatable,default='true',help='Return to the beginning after reading the test data. (default: enabled)'"`
Random bool `kong:"negatable,default='false',help='Randomize the starting position of the test data. (default: disabled)'"`
CommitRate uint `kong:"help='Number of queries to execute \"COMMIT\".'"`
}
type DataPointWithErr ¶ added in v1.0.0
type JSONDuration ¶
func (JSONDuration) MarshalJSON ¶
func (jd JSONDuration) MarshalJSON() (b []byte, err error)
type Options ¶
type Options struct {
AgentOptions
DataOptions
DBConfig
Nagents uint64 `kong:"short='n',default='1',help='Number of agents.'"`
Rate float64 `kong:"short='r',help='Rate limit (qps). \"0\" means unlimited.'"`
Time time.Duration `json:"-" kong:"short='t',help='Maximum execution time of the test. \"0\" means unlimited.'"`
X_Time JSONDuration `json:"Time" kong:"-"` // for report
Progress bool `json:"-" kong:"negatable,help='Show progress report.'"`
Color bool `json:"-" kong:"negatable,short='C',help='Color report JSON.'"`
}
func (*Options) AfterApply ¶
func (*Options) BeforeApply ¶ added in v1.1.0
Kong hook see https://github.com/alecthomas/kong#hooks-beforereset-beforeresolve-beforeapply-afterapply-and-the-bind-option
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
func NewProgress ¶
type Recorder ¶
type Recorder struct {
*Options
ID string
StartedAt time.Time
FinishedAt time.Time
// contains filtered or unexported fields
}
func NewRecorder ¶
func (*Recorder) Add ¶
func (rec *Recorder) Add(dpes []DataPointWithErr)
func (*Recorder) CountSuccess ¶ added in v1.0.0
func (*Recorder) DataPoints ¶
func (*Recorder) ErrorQueryCount ¶
type Report ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.