fast path for labels
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
6a35c083ad
commit
e9a657e895
@ -25,6 +25,11 @@ func (r *victoriametricsMeter) buildName(name string, labels ...string) string {
|
||||
if len(r.opts.MetricPrefix) > 0 {
|
||||
name = r.opts.MetricPrefix + name
|
||||
}
|
||||
|
||||
if len(labels) == 0 {
|
||||
return name
|
||||
}
|
||||
|
||||
if len(r.opts.LabelPrefix) == 0 {
|
||||
return meter.BuildName(name, labels...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user