mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
chore: comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
parent
e9a0619ede
commit
36e87385cb
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue