MCPcopy Create free account
hub / github.com/deepflowio/deepflow / newDataToEncode

Function newDataToEncode

server/controller/prometheus/label.go:381–392  ·  view source on GitHub ↗
(c *cache.Cache)

Source from the content-addressed store, hash-verified

379}
380
381func newDataToEncode(c *cache.Cache) *dataToEncode {
382 return &dataToEncode{
383 cache: c,
384
385 metricNames: mapset.NewSet[string](),
386 labelNames: mapset.NewSet[string](),
387 labelValues: mapset.NewSet[string](),
388 metricAPPLabelLayouts: mapset.NewSet[cache.LayoutKey](),
389 labels: mapset.NewSet[cache.LabelKey](),
390 metricNameToLabelNames: make(map[string]mapset.Set[string], 0),
391 }
392}
393
394func (d *dataToEncode) cardinality() int {
395 return d.metricNames.Cardinality() + d.labelNames.Cardinality() + d.labelValues.Cardinality() +

Callers 1

splitDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected