Documentation ¶
Index ¶
- func NewTDigestCollectorBuilder(mode string) func() Collector
- type Collector
- type Details
- type TDigest
- type TDigestDetailsCollector
- func (t *TDigestDetailsCollector) Add(result *fcom.Result)
- func (t *TDigestDetailsCollector) Get() *fcom.Data
- func (t *TDigestDetailsCollector) Merge(bs []byte) (err error)
- func (t *TDigestDetailsCollector) MergeC(collector Collector) (err error)
- func (t *TDigestDetailsCollector) Reset()
- func (t *TDigestDetailsCollector) Serialize() []byte
- func (t *TDigestDetailsCollector) Type() string
- type TDigestSummaryCollector
- func (t *TDigestSummaryCollector) Add(result *fcom.Result)
- func (t *TDigestSummaryCollector) Get() *fcom.Data
- func (t *TDigestSummaryCollector) Merge(bytes []byte) (err error)
- func (t *TDigestSummaryCollector) MergeC(collector Collector) (err error)
- func (t *TDigestSummaryCollector) Reset()
- func (t *TDigestSummaryCollector) Serialize() []byte
- func (t *TDigestSummaryCollector) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTDigestCollectorBuilder ¶
NewTDigestCollectorBuilder create Collector by mode.
Types ¶
type Collector ¶
type Collector interface { // Type return the types of collector Type() string // Add append result to statistic Add(*fcom.Result) // Serialize generate serialized data to pass through network in remote mode Serialize() []byte // Merge merge serialized data Merge([]byte) error // MergeC try to merge a Collector, if it can not do this, just raise a error MergeC(Collector) error // Get get current statistic data group by label Get() *fcom.Data // Reset reset data should reset the time window and clean data Reset() }
Collector is used to collect result and generate statistic data group by label Collector may not be implement concurrently safe, so you should receive data in a goroutine
func NewTDigestDetailsCollector ¶
func NewTDigestDetailsCollector() Collector
NewTDigestDetailsCollector new TDigestDetailsCollector and return.
func NewTDigestSummaryCollector ¶
func NewTDigestSummaryCollector() Collector
NewTDigestSummaryCollector create TDigestSummaryCollector.
type Details ¶
type Details struct { Label string Num int SendLatency *TDigest ConfirmLatency *TDigest WriteLatency *TDigest Status map[fcom.Status]int }
Details detail info for statistic.
type TDigest ¶
TDigest defined for use tdigest.TDigest.
func (*TDigest) MarshalJSON ¶
MarshalJSON implement Marshaler.
func (*TDigest) UnmarshalJSON ¶
UnmarshalJSON implement Unmarshaler.
type TDigestDetailsCollector ¶
TDigestDetailsCollector is the implement of Collector processing result in detail
func (*TDigestDetailsCollector) Add ¶
func (t *TDigestDetailsCollector) Add(result *fcom.Result)
Add append result to statistic
func (*TDigestDetailsCollector) Get ¶
func (t *TDigestDetailsCollector) Get() *fcom.Data
Get get current statistic data group by label
func (*TDigestDetailsCollector) Merge ¶
func (t *TDigestDetailsCollector) Merge(bs []byte) (err error)
Merge merge serialized data
func (*TDigestDetailsCollector) MergeC ¶
func (t *TDigestDetailsCollector) MergeC(collector Collector) (err error)
MergeC try to merge a Collector, if it can not do this, just raise a error
func (*TDigestDetailsCollector) Reset ¶
func (t *TDigestDetailsCollector) Reset()
Reset reset data should reset the time window and clean data.
func (*TDigestDetailsCollector) Serialize ¶
func (t *TDigestDetailsCollector) Serialize() []byte
Serialize generate serialized data to pass through network in remote mode
func (*TDigestDetailsCollector) Type ¶
func (t *TDigestDetailsCollector) Type() string
Type return the types of collector
type TDigestSummaryCollector ¶
TDigestSummaryCollector is the implement of Collector processing result in summary
func (*TDigestSummaryCollector) Add ¶
func (t *TDigestSummaryCollector) Add(result *fcom.Result)
Add append result to statistic
func (*TDigestSummaryCollector) Get ¶
func (t *TDigestSummaryCollector) Get() *fcom.Data
Get get current statistic data group by label
func (*TDigestSummaryCollector) Merge ¶
func (t *TDigestSummaryCollector) Merge(bytes []byte) (err error)
Merge merge serialized data
func (*TDigestSummaryCollector) MergeC ¶
func (t *TDigestSummaryCollector) MergeC(collector Collector) (err error)
MergeC try to merge a Collector, if it can not do this, just raise a error
func (*TDigestSummaryCollector) Reset ¶
func (t *TDigestSummaryCollector) Reset()
Reset reset data should reset the time window and clean data.
func (*TDigestSummaryCollector) Serialize ¶
func (t *TDigestSummaryCollector) Serialize() []byte
Serialize generate serialized data to pass through network in remote mode
func (*TDigestSummaryCollector) Type ¶
func (t *TDigestSummaryCollector) Type() string
Type return the types of collector