Documentation
¶
Index ¶
- type Detail
- func (s *Detail) DealRecord(t time.Time, record types.Record)
- func (s *Detail) LastAverageCost() int64
- func (s *Detail) LastErrRate() float64
- func (s *Detail) LastErrRateLevel() int
- func (s *Detail) LastErrorRecord() *ErrorRecordAt
- func (s *Detail) LastRecord() *RecordAt
- func (s *Detail) LastStatisticLatencyLow() bool
- func (s *Detail) ResizeViewWindow(size int)
- func (s *Detail) RetireRecord(t time.Time)
- type ErrorRecordAt
- type RecordAt
- type SortStrategy
- type StSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detail ¶
type Detail struct {
ID int
Title string
Total int
ErrCount int
Cost []int
Dead bool
// contains filtered or unexported fields
}
Detail provide ability for statistic
func (*Detail) DealRecord ¶
DealRecord deal new record at t
func (*Detail) LastAverageCost ¶
LastAverageCost represents latest speed in window
func (*Detail) LastErrRate ¶
LastErrRate represents latest error rate in window
func (*Detail) LastErrRateLevel ¶ added in v0.4.0
LastErrRateLevel represents the level of last error rate
func (*Detail) LastErrorRecord ¶
func (s *Detail) LastErrorRecord() *ErrorRecordAt
LastErrorRecord represents latest error record
func (*Detail) LastRecord ¶
LastRecord represents latest record
func (*Detail) LastStatisticLatencyLow ¶ added in v0.4.0
LastStatisticLatencyLow represents last average cose is lower than threshold
func (*Detail) ResizeViewWindow ¶
ResizeViewWindow resize view window to size
func (*Detail) RetireRecord ¶
RetireRecord retires those records out of window
type ErrorRecordAt ¶
ErrorRecordAt error record
type SortStrategy ¶
type SortStrategy int
SortStrategy represents how to sort statistics
const (
Default SortStrategy = iota
)
Provided strategys
type StSlice ¶
type StSlice struct {
Details []*Detail
SortStrategy SortStrategy
}
StSlice helps sort statistics
Click to show internal directories.
Click to hide internal directories.