From 36e87385cbeb33a3822a1b6722647b3a0b97a1a5 Mon Sep 17 00:00:00 2001 From: Manik Rana Date: Fri, 12 Jul 2024 00:45:36 +0530 Subject: [PATCH] chore: comments Signed-off-by: Manik Rana --- model/textparse/openmetricsparse.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/textparse/openmetricsparse.go b/model/textparse/openmetricsparse.go index 8b83a1a61b..106a6fd052 100644 --- a/model/textparse/openmetricsparse.go +++ b/model/textparse/openmetricsparse.go @@ -279,6 +279,7 @@ func (p *OpenMetricsParser) CreatedTimestamp() *int64 { } } +// typeRequiresCT returns true if the metric type requires a _created timestamp. func typeRequiresCT(t model.MetricType) bool { switch t { case model.MetricTypeCounter, model.MetricTypeSummary, model.MetricTypeHistogram: @@ -288,7 +289,7 @@ func typeRequiresCT(t model.MetricType) bool { } } -// createdTimestampParser creates a copy of a parser without re-using the slices' original memory addresses. +// deepCopy creates a copy of a parser without re-using the slices' original memory addresses. func deepCopy(p *OpenMetricsParser) OpenMetricsParser { newB := make([]byte, len(p.l.b)) copy(newB, p.l.b)