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:
M. Mert Yıldıran
2021-09-13 16:22:16 +03:00
committed by GitHub
parent 616eccb2cf
commit 7dca1ad889
6 changed files with 91 additions and 135 deletions

View File

@@ -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 {