Documentation ¶
Overview ¶
Package pmc provides a Probabilistic Multiplicity Counting Sketch, a novel data structure that is capable of accounting traffic per flow probabilistically, that can be used as an alternative to Count-min sketch. The stream processing algorithm — Probabilistic Multiplicity Counting (PMC) — uses probabilistic counting techniques to determine the approximate multiplicity of each element in large streams. It is particularly well suited for traffic measurements on high-speed communication links and likewise applicable for many other purposes.
Count-Min Sketches hold counters in a matrix-like organization. A big caveat for both Spectral Bloom Filters and Count-Min Sketches is that the maximum multiplicity has to be known a priori quite accurately, to provide large enough counters without wasting too much memory. PMC does not need to know the maximum frequency beforehand, and its counting operation is much simpler.
For details about the algorithm and citations please use this article: "High-Speed Per-Flow Traffic Measurement with Probabilistic Multiplicity Counting" by Peter Lieven & Björn Scheuermann (https://wwwcn.cs.uni-duesseldorf.de/publications/publications/library/Lieven2010a.pdf)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sketch ¶
type Sketch struct {
// contains filtered or unexported fields
}
Sketch is a Probabilistic Multiplicity Counting Sketch, a novel data structure that is capable of accounting traffic per flow probabilistically, that can be used as an alternative to Count-min sketch.
func New ¶
New returns a PMC Sketch with the properties: l = total number of bits for sketch m = total number of rows for each flow w = total number of columns for each flow
func NewForMaxFlows ¶
NewForMaxFlows returns a PMC Sketch adapted to the size of the max number of flows expected.
func (*Sketch) GetEstimate ¶
GetEstimate returns the estimated count of a given flow