metrics

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordDie

func RecordDie(pid string)

func RecordDrop

func RecordDrop(pid string, amount int)

func RecordDropRemote

func RecordDropRemote(machine string, amount int)

func RecordReceive

func RecordReceive(pid string)

func RecordReceiveRemote

func RecordReceiveRemote(pid string)

func RecordSendLocal

func RecordSendLocal(target string)

func RecordSendRemote

func RecordSendRemote(target string)

func RecordSpawn

func RecordSpawn(pid string)

func RecordUnhandled

func RecordUnhandled(target string)

func RegisterRecorder

func RegisterRecorder(recorder Recorder)

Types

type Recorder

type Recorder interface {
	//Init inits the recorder
	Init()

	//RecordSpawn records the spawn of an actor
	RecordSpawn(pid string)

	//RecordDie records the death of an actor
	RecordDie(pid string)

	//RecordDrop records the amount of messages still in
	//an actors inbox when the actor went down
	RecordDrop(pid string, amount int)

	//RecordDropRemote records the amount of messages still
	//waiting to be sent to a remote machine when the remote
	//machine disconnects
	RecordDropRemote(machineId string, amount int)

	//RecordUnhandled records all messages that could not
	//be sent due to the actor or remote machine connection
	//already being down
	RecordUnhandled(target string)

	//RecordReceive records the reception of a message
	RecordReceive(pid string)

	//RecordReceiveRemote records the reception of a message
	//from a remote system
	RecordReceiveRemote(pid string)

	//RecordSendLocal records the sending of a message to a
	//local actor
	RecordSendLocal(target string)

	//RecordSendRemote records the sending of a message to a
	//remote actor
	RecordSendRemote(target string)
}

type TimedConsoleHook

type TimedConsoleHook struct {
}

TimedConsoleHook is a simple TimedRecorderHook that just prints to stdout.

func (*TimedConsoleHook) Record

func (t *TimedConsoleHook) Record(metrics TimedMetrics)

Record is the callback for the TimedRecorder.

type TimedMetrics

type TimedMetrics struct {
	SpawnCount,
	DieCount,
	DropCount,
	RemoteDropCount,
	UnhandledCount,
	ReceiveTotalCount,
	ReceiveRemoteCount,
	SendLocalCount,
	SendRemoteCount int32
}

type TimedRecorder

type TimedRecorder struct {
	// contains filtered or unexported fields
}

func NewTimedRecorder

func NewTimedRecorder(hook TimedRecorderHook, interval time.Duration) *TimedRecorder

func (*TimedRecorder) Init

func (t *TimedRecorder) Init()

func (*TimedRecorder) RecordDie

func (t *TimedRecorder) RecordDie(pid string)

func (*TimedRecorder) RecordDrop

func (t *TimedRecorder) RecordDrop(pid string, amount int)

func (*TimedRecorder) RecordDropRemote

func (t *TimedRecorder) RecordDropRemote(machineId string, amount int)

func (*TimedRecorder) RecordReceive

func (t *TimedRecorder) RecordReceive(pid string)

func (*TimedRecorder) RecordReceiveRemote

func (t *TimedRecorder) RecordReceiveRemote(pid string)

func (*TimedRecorder) RecordSendLocal

func (t *TimedRecorder) RecordSendLocal(target string)

func (*TimedRecorder) RecordSendRemote

func (t *TimedRecorder) RecordSendRemote(target string)

func (*TimedRecorder) RecordSpawn

func (t *TimedRecorder) RecordSpawn(pid string)

func (*TimedRecorder) RecordUnhandled

func (t *TimedRecorder) RecordUnhandled(target string)

type TimedRecorderHook

type TimedRecorderHook interface {
	Record(metrics TimedMetrics)
}

Jump to

Keyboard shortcuts

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