Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen1778 committed Dec 15, 2023
1 parent 5bb0070 commit 8949879
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions set.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (s *Set) WritePrometheus(w io.Writer) {
var metricFamily string
for _, nm := range sa {
if writeMetadata && metricFamily != nm.family {
// write meta
// write meta info only once per metric family
metricFamily = nm.family
nm.metric.marshalMeta(metricFamily, &bb)
}
Expand All @@ -61,7 +61,6 @@ func (s *Set) WritePrometheus(w io.Writer) {
nm.metric.marshalTo(nm.name, &bb)
}
w.Write(bb.Bytes())
return
}

// NewHistogram creates and returns new histogram in s with the given name.
Expand Down

0 comments on commit 8949879

Please sign in to comment.