Documentation
¶
Index ¶
- func CheckQPSDropFromSysbenchOutputStream(reader io.Reader, threshold float64) (bool, string)
- func CheckQPSDropFromSysbenchOutputText(text string, threshold float64) (bool, string)
- func FormatRecord(record Record) string
- func PlotQPS(records []Record, imageFilePath string) error
- type QPSDropRule
- type Record
- type Rule
- type SysbenchAnalyzer
- type Violation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckQPSDropFromSysbenchOutputText ¶
CheckQPSDropFromSysbenchOutputText parses a string as sysbench output and check if there exists abnormal QPS drop. A record is regarded as abnormal if it's QPS is less than threshold * average_qps_of_normal_records. Returns whether the check passed. If not, the second return value will be a string that contains all abnormal records.
func FormatRecord ¶
Types ¶
type QPSDropRule ¶
type QPSDropRule struct {
// contains filtered or unexported fields
}
func (*QPSDropRule) Check ¶
func (r *QPSDropRule) Check(records []Record) []Violation
func (*QPSDropRule) GetDescription ¶
func (r *QPSDropRule) GetDescription() string
type Record ¶
type Record struct {
Second int32
Threads int32
TPS float64
QPS float64
ReadQPS float64
WriteQPS float64
OtherQPS float64
Latency float64
LatencyLimit float64
ErrorPerSec float64
ReconnectPerSec float64
}
func ParseRecord ¶
type Rule ¶
func NewQPSDropRule ¶
NewQPSDropRule creates a rule that checks if there is a set of records with their QPS all less than threshold * average_of_others. No more than half of records will be put into the set.
type SysbenchAnalyzer ¶
type SysbenchAnalyzer struct {
// contains filtered or unexported fields
}
func NewSysbenchAnalyzer ¶
func NewSysbenchAnalyzer(rules []Rule, ignoreInvalidLines bool) SysbenchAnalyzer
func (*SysbenchAnalyzer) AnalyzeParsedRecords ¶
func (a *SysbenchAnalyzer) AnalyzeParsedRecords(records []Record) []Violation
func (*SysbenchAnalyzer) AnalyzeStream ¶
func (a *SysbenchAnalyzer) AnalyzeStream(reader io.Reader) []Violation
func (*SysbenchAnalyzer) AnalyzeString ¶
func (a *SysbenchAnalyzer) AnalyzeString(str string) []Violation
func (*SysbenchAnalyzer) ParseToEnd ¶
func (a *SysbenchAnalyzer) ParseToEnd(reader io.Reader) ([]Record, []Violation)
Click to show internal directories.
Click to hide internal directories.