profile

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_ELEMENT_ACTION = iota
	TIME_ELEMENT_TASK
	TIME_ELEMENT_TIMER
	TIME_ELEMENT_NET
	TIME_ELEMENT_COMMAND
	TIME_ELEMENT_MODULE
	TIME_ELEMENT_JOB
)

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 TimeElement struct {
	Name        string
	ElementType int
	Times       int64
	TotalTick   int64
	MaxTick     int64
	MinTick     int64
}

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() (t *TimeWatcher)

func (*WatcherPool) Give

func (wp *WatcherPool) Give(t *TimeWatcher)

Jump to

Keyboard shortcuts

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