Documentation
¶
Index ¶
- Constants
- type ReportItem
- type Statistics
- func (s *Statistics) Add(tag string, n int32) *Statistics
- func (s *Statistics) Decr(tag string) *Statistics
- func (s *Statistics) DecrN(tag string, n int32) *Statistics
- func (s *Statistics) Flush(tag string, data interface{})
- func (s *Statistics) Get(tag string) (TagItem, bool)
- func (s *Statistics) Incr(tag string) *Statistics
- func (s *Statistics) IncrN(tag string, n int32) *Statistics
- func (s *Statistics) Init(itemType string, tag string, title string)
- func (s *Statistics) Report() []ReportItem
- func (s *Statistics) Set(tag string, data interface{}) *Statistics
- type TagItem
Constants ¶
View Source
const TypeCounter = "counter"
计数器,得到 counter
View Source
const TypeData = "data"
任意数据
View Source
const TypeSamples = "samples"
采样,得到 counter, max, min, avg
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReportItem ¶
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Statistics
func (*Statistics) Flush ¶
func (s *Statistics) Flush(tag string, data interface{})
清空统计信息(一般与 report() 配合使用)
Click to show internal directories.
Click to hide internal directories.