goperfstat

package
v0.0.0-...-e3601d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MulanPSL-2.0 Imports: 12 Imported by: 2

Documentation

Index

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

func TimerLog

func TimerLog()

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

func (*GoperfStat) TopicType

func (self *GoperfStat) TopicType(topic string) (string, error)

func (*GoperfStat) Trigger

func (self *GoperfStat) Trigger(topic string, ok bool, t int64)

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

func (*GostatInfo) Stat

func (self *GostatInfo) Stat(topic string, ok bool, t int64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL