Documentation
¶
Index ¶
Constants ¶
View Source
const ( TIME_ELEMENT_ACTION = basic.TimeElementAction TIME_ELEMENT_TASK = basic.TimeElementTask TIME_ELEMENT_TIMER = basic.TimeElementTimer TIME_ELEMENT_NET = basic.TimeElementNet TIME_ELEMENT_COMMAND = basic.TimeElementCommand TIME_ELEMENT_MODULE = basic.TimeElementModule TIME_ELEMENT_JOB = basic.TimeElementJob )
元素类型常量已统一定义在 basic 包,此处保留别名兼容旧引用
Variables ¶
View Source
var Config = Configuration{}
View Source
var TimeStatisticMgr = &timeStatisticMgr{ elements: make(map[string]*TimeElement), }
Functions ¶
func FreeWatcher ¶
func FreeWatcher(t *TimeWatcher)
func GetStats ¶
func GetStats() map[string]TimeElement
Types ¶
type Configuration ¶
type Configuration struct {
SlowMS int
}
func (*Configuration) Close ¶
func (c *Configuration) Close() error
func (*Configuration) Init ¶
func (c *Configuration) Init() error
func (*Configuration) Name ¶
func (c *Configuration) Name() string
type TimeElement ¶
type TimeWatcher ¶
type TimeWatcher struct {
// contains filtered or unexported fields
}
func AllocWatcher ¶
func AllocWatcher() *TimeWatcher
func (*TimeWatcher) Stop ¶
func (this *TimeWatcher) Stop()
type WatcherPool ¶
type WatcherPool struct {
// contains filtered or unexported fields
}
func NewWatcherPool ¶
func NewWatcherPool(num int) *WatcherPool
func (*WatcherPool) Get ¶
func (wp *WatcherPool) Get() *TimeWatcher
func (*WatcherPool) Give ¶
func (wp *WatcherPool) Give(t *TimeWatcher)
Click to show internal directories.
Click to hide internal directories.