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

Method tryAppendMetricName

server/controller/prometheus/label.go:399–403  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

397}
398
399func (d *dataToEncode) tryAppendMetricName(name string) {
400 if _, ok := d.cache.MetricName.GetIDByName(name); !ok {
401 d.metricNames.Add(name)
402 }
403}
404
405func (d *dataToEncode) tryAppendLabelName(name string) {
406 if _, ok := d.cache.LabelName.GetIDByName(name); !ok {

Callers 1

splitDataMethod · 0.80

Calls 2

GetIDByNameMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected