Documentation
¶
Index ¶
- Constants
- Variables
- func AddState(st stats.IState, append bool)
- func Enabled() bool
- func Finalize()
- func FinalizeForMonitor()
- func GetActiveCreateCounter() *util.AtomicCounter
- func GetActiveDestroyCounter() *util.AtomicCounter
- func GetActiveGetCounter() *util.AtomicCounter
- func GetActiveSetCounter() *util.AtomicCounter
- func GetActiveUDFGetCounter() *util.AtomicCounter
- func GetActiveUDFSetCounter() *util.AtomicCounter
- func GetActiveUpdateCounter() *util.AtomicCounter
- func GetThroughputEmaErrorRate() (tps uint32, ema uint32, eps uint32)
- func Init(id int32, logfilepath string)
- func InitMachCpuUsage()
- func InitProcCpuUsage()
- func Initialize(args ...interface{}) (err error)
- func InitializeForMonitor(args ...interface{}) (err error)
- func MachCpuUsage() (usage float32)
- func ProcCpuUsage() (usage float32)
- func Quit()
- func RunCollector()
- func RunMonitorLogger()
- func SendProcState(st stats.ProcStat)
- func SetListeners(lsnrs []io.IListener)
- func SetRepStatsCallBack(cb IShmStatsWriterCallBack)
- type HandlerForMonitor
- type IShmStatsWriterCallBack
- type StateLog
- type Type
Constants ¶
View Source
const ( ActiveCreate = iota ActiveGet ActiveUpdate ActiveSet ActiveDestroy ActiveUDFGet ActiveUDFSet NumErrors LastCounter // insert new counter before this )
counters
View Source
const ( KTypeManager = Type(1) KTypeMonitor = Type(2) KTypeWorker = Type(3) KTypeStandAloneWorker = Type(4) )
Variables ¶
View Source
var (
HttpServerMux http.ServeMux
)
Functions ¶
func FinalizeForMonitor ¶
func FinalizeForMonitor()
func GetActiveCreateCounter ¶
func GetActiveCreateCounter() *util.AtomicCounter
func GetActiveDestroyCounter ¶
func GetActiveDestroyCounter() *util.AtomicCounter
func GetActiveGetCounter ¶
func GetActiveGetCounter() *util.AtomicCounter
func GetActiveSetCounter ¶
func GetActiveSetCounter() *util.AtomicCounter
func GetActiveUDFGetCounter ¶
func GetActiveUDFGetCounter() *util.AtomicCounter
func GetActiveUDFSetCounter ¶
func GetActiveUDFSetCounter() *util.AtomicCounter
func GetActiveUpdateCounter ¶
func GetActiveUpdateCounter() *util.AtomicCounter
func InitMachCpuUsage ¶
func InitMachCpuUsage()
func InitProcCpuUsage ¶
func InitProcCpuUsage()
func Initialize ¶
func Initialize(args ...interface{}) (err error)
Arguments arg 0: Type stats.Type arg 1: WorkerId int, if Type == KTypeWorker
func InitializeForMonitor ¶
func InitializeForMonitor(args ...interface{}) (err error)
func MachCpuUsage ¶
func MachCpuUsage() (usage float32)
func ProcCpuUsage ¶
func ProcCpuUsage() (usage float32)
func RunCollector ¶
func RunCollector()
func RunMonitorLogger ¶
func RunMonitorLogger()
func SendProcState ¶
func SetListeners ¶
func SetRepStatsCallBack ¶
func SetRepStatsCallBack(cb IShmStatsWriterCallBack)
Types ¶
type HandlerForMonitor ¶
type HandlerForMonitor struct {
// contains filtered or unexported fields
}
func (*HandlerForMonitor) GetNumWorkers ¶
func (h *HandlerForMonitor) GetNumWorkers() int
func (*HandlerForMonitor) GetWorkerUrl ¶
func (h *HandlerForMonitor) GetWorkerUrl(i int) string
func (*HandlerForMonitor) Init ¶
func (h *HandlerForMonitor) Init(isChild bool, addrs []string)
func (*HandlerForMonitor) ListenAndServe ¶
func (h *HandlerForMonitor) ListenAndServe(addr string) error
type IShmStatsWriterCallBack ¶
type IShmStatsWriterCallBack interface {
Call()
}
type StateLog ¶
func (*StateLog) ProcessStateChange ¶
collect stats
func (*StateLog) ProcessWrite ¶
called before write to the state log file
Source Files
¶
Click to show internal directories.
Click to hide internal directories.