mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-03 19:48:45 +00:00
Move stats_tracker.go
into the extension API and increment MatchedPairs
from inside the Emit
method (#272)
* Move `stats_tracker.go` into the extension API and increment `MatchedPairs` from inside the `Emit` method * Replace multiple `sync.Mutex`(es) with low-level atomic memory primitives
This commit is contained in:
@@ -87,6 +87,7 @@ type Dissector interface {
|
||||
}
|
||||
|
||||
type Emitting struct {
|
||||
AppStats *AppStats
|
||||
OutputChannel chan *OutputChannelItem
|
||||
}
|
||||
|
||||
@@ -96,6 +97,7 @@ type Emitter interface {
|
||||
|
||||
func (e *Emitting) Emit(item *OutputChannelItem) {
|
||||
e.OutputChannel <- item
|
||||
e.AppStats.IncMatchedPairs()
|
||||
}
|
||||
|
||||
type MizuEntry struct {
|
||||
|
Reference in New Issue
Block a user