MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / NewStackwalkDecorator

Function NewStackwalkDecorator

pkg/event/stackwalk.go:72–84  ·  view source on GitHub ↗

NewStackwalkDecorator creates a new callstack return addresses decorator which receives the event queue for long-standing event flushing.

(q *Queue)

Source from the content-addressed store, hash-verified

70// addresses decorator which receives the event queue
71// for long-standing event flushing.
72func NewStackwalkDecorator(q *Queue) *StackwalkDecorator {
73 s := &StackwalkDecorator{
74 q: q,
75 buckets: make(map[uint64][]*Event),
76 procs: make(map[uint32]*Event),
77 flusher: time.NewTicker(flusherInterval),
78 quit: make(chan struct{}, 1),
79 }
80
81 go s.doFlush()
82
83 return s
84}
85
86// Push pushes a new event to the queue.
87func (s *StackwalkDecorator) Push(e *Event) {

Callers 5

TestStackwalkDecoratorFunction · 0.85
NewQueueFunction · 0.85
NewQueueWithChannelFunction · 0.85

Calls 1

doFlushMethod · 0.95

Tested by 3

TestStackwalkDecoratorFunction · 0.68