Documentation ¶
Overview ¶
Package eventstream holds eventstream related files
Package eventstream holds eventstream related files
Index ¶
- Constants
- type InvalidEventCause
- type LostEventCounter
- type MapStats
- type Monitor
- func (pbm *Monitor) CountEvent(eventType model.EventType, timestamp uint64, count uint64, size uint64, ...)
- func (pbm *Monitor) CountInvalidEvent(mapName string, cause InvalidEventCause, size uint64)
- func (pbm *Monitor) CountLostEvent(count uint64, mapName string, cpu int)
- func (pbm *Monitor) GetAndResetLostCount(perfMap string, cpu int) uint64
- func (pbm *Monitor) GetEventStats(eventType model.EventType, perfMap string, cpu int) (MapStats, MapStats)
- func (pbm *Monitor) GetKernelLostCount(perfMap string, cpu int, evtTypes ...model.EventType) uint64
- func (pbm *Monitor) GetLostCount(perfMap string, cpu int) uint64
- func (pbm *Monitor) SendStats() error
Constants ¶
const EventStreamMap = "events"
EventStreamMap defines the event stream map name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidEventCause ¶
type InvalidEventCause int
InvalidEventCause is an enum that represents the cause of an invalid event
const ( // InvalidType indicates that the type of an event is invalid InvalidType InvalidEventCause = iota )
func (InvalidEventCause) String ¶
func (cause InvalidEventCause) String() string
type LostEventCounter ¶
LostEventCounter interface used to monitor event loss
type MapStats ¶
MapStats contains the collected metrics for one event and one cpu in a perf buffer statistics map
func NewEventStreamMapStats ¶
func NewEventStreamMapStats() MapStats
NewEventStreamMapStats returns a new MapStats correctly initialized
func (*MapStats) UnmarshalBinary ¶
UnmarshalBinary parses a map entry and populates the current EventStreamMapStats instance
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor holds statistics about the number of lost and received events
func NewEventStreamMonitor ¶
func NewEventStreamMonitor(config *config.Config, eRPC *erpc.ERPC, manager *manager.Manager, statsdClient statsd.ClientInterface, onEventLost func(perfMapName string, perEvent map[string]uint64), useRingBuffers bool) (*Monitor, error)
NewEventStreamMonitor instantiates a new event statistics counter
func (*Monitor) CountEvent ¶
func (pbm *Monitor) CountEvent(eventType model.EventType, timestamp uint64, count uint64, size uint64, mapName string, cpu int)
CountEvent adds `count` to the counter of received events of the specified type
func (*Monitor) CountInvalidEvent ¶
func (pbm *Monitor) CountInvalidEvent(mapName string, cause InvalidEventCause, size uint64)
CountInvalidEvent counts the size of one invalid event of the specified cause
func (*Monitor) CountLostEvent ¶
CountLostEvent adds `count` to the counter of lost events
func (*Monitor) GetAndResetLostCount ¶
GetAndResetLostCount returns the number of lost events and resets the counter for a given map and cpu. If a cpu of -1 is provided, the function will reset the counters of all the cpus for the provided map, and return the sum of all the lost events of all the cpus of the provided map. (only used in tests)
func (*Monitor) GetEventStats ¶
func (pbm *Monitor) GetEventStats(eventType model.EventType, perfMap string, cpu int) (MapStats, MapStats)
GetEventStats returns the number of received events of the specified type (only used in tests)
func (*Monitor) GetKernelLostCount ¶
GetKernelLostCount returns the number of lost events for a given map and cpu. If a cpu of -1 is provided, the function will return the sum of all the lost events of all the cpus.
func (*Monitor) GetLostCount ¶
GetLostCount returns the number of lost events for a given map and cpu. If a cpu of -1 is provided, the function will return the sum of all the lost events of all the cpus. (only used in tests)
Directories ¶
Path | Synopsis |
---|---|
Package reorderer holds reorderer related files
|
Package reorderer holds reorderer related files |
Package ringbuffer holds ringbuffer related files
|
Package ringbuffer holds ringbuffer related files |