Documentation
¶
Index ¶
- Constants
- func InjectGoperfStat(s *GoperfStat)
- func InjectGostatInfo(s *GostatInfo)
- func LoadGoperfStat() baseiface.ISingleton
- func LoadGostatInfo() baseiface.ISingleton
- func TimerLog()
- type GoperfStat
- func (self *GoperfStat) FindStatMap() map[string]*GostatInfo
- func (self *GoperfStat) StartStats()
- func (self *GoperfStat) Stat(g *GostatInfo) error
- func (self *GoperfStat) ToStat() map[string]*GostatInfo
- func (self *GoperfStat) ToStatInf() string
- func (self *GoperfStat) TopicType(topic string) (string, error)
- func (self *GoperfStat) Trigger(topic string, ok bool, t int64)
- type GostatInfo
Constants ¶
View Source
const ( DomainGeneral = "general" //通用域 general //性能统计 TopicGeneralSyncSTAT = "GeneralEsSync.SYSTEM.STAT" // 连接信息 Topic_DOMAIN_GENEAL_ASyncCONN = "GeneralEsSync.SYSTEM.CONN" Topic_DOMAIN_GENEAL_ASync_DISCONN = "GeneralEsSync.SYSTEM.DISCONN" //性能统计通知消息 Topic_Async_Notify_PRE = "GeneralDefault.*" Topic_Async_NotifyCMS = "GeneralDefault.CMS" )
View Source
const BIGCACHE_KEY = "bigcache_stat"
View Source
const STAT_KEY_ALL = "TOPIC_ALL"
View Source
const STAT_LOG_INTERVAL time.Duration = 5 //* time.Second
View Source
const STAT_MSG_TYPE_ES = "es"
View Source
const STAT_MSG_TYPE_NATS = "nats"
Variables ¶
This section is empty.
Functions ¶
func InjectGoperfStat ¶
func InjectGoperfStat(s *GoperfStat)
func InjectGostatInfo ¶
func InjectGostatInfo(s *GostatInfo)
func LoadGoperfStat ¶
func LoadGoperfStat() baseiface.ISingleton
func LoadGostatInfo ¶
func LoadGostatInfo() baseiface.ISingleton
Types ¶
type GoperfStat ¶
type GoperfStat struct {
basedto.BaseEntitySingle
StatMap map[string]*GostatInfo
Lock sync.RWMutex
// contains filtered or unexported fields
}
func FindBeanGoperfStat ¶
func FindBeanGoperfStat() *GoperfStat
func NewGoperfStat ¶
func NewGoperfStat() *GoperfStat
func (*GoperfStat) FindStatMap ¶
func (self *GoperfStat) FindStatMap() map[string]*GostatInfo
func (*GoperfStat) StartStats ¶
func (self *GoperfStat) StartStats()
func (*GoperfStat) Stat ¶
func (self *GoperfStat) Stat(g *GostatInfo) error
func (*GoperfStat) ToStat ¶
func (self *GoperfStat) ToStat() map[string]*GostatInfo
func (*GoperfStat) ToStatInf ¶
func (self *GoperfStat) ToStatInf() string
type GostatInfo ¶
type GostatInfo struct {
basedto.BaseEntity
Domain string `json:"domain"`
MsgType string `json:"msgtype"`
Topic string `json:"topic"`
Total int64 `json:"total"`
Times int64
Max int64
Min int64
Avg int64
Oknum int64 `json:"oknum"`
Failnum int64 `json:"failnum"`
// contains filtered or unexported fields
}
func FindBeanGostatInfo ¶
func FindBeanGostatInfo() *GostatInfo
func NewGostatInfo ¶
func NewGostatInfo() *GostatInfo
Source Files
¶
Click to show internal directories.
Click to hide internal directories.