Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed Nov 17, 2023
1 parent 569f35b commit e7fc835
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewAppendable(
useCreatedMetric bool,
externalLabels labels.Labels,
trimSuffixes bool) (storage.Appendable, error) {

var metricAdjuster MetricsAdjuster
if !useStartTimeMetric {
metricAdjuster = NewInitialPointAdjuster(set.Logger, gcInterval, useCreatedMetric)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ func (a *initialPointAdjuster) adjustMetricHistogram(tsm *timeseriesMap, current
if a.useCreatedMetric &&
!currentDist.Flags().NoRecordedValue() &&
currentDist.StartTimestamp() < currentDist.Timestamp() {

continue
}

Expand Down Expand Up @@ -355,6 +356,7 @@ func (a *initialPointAdjuster) adjustMetricSum(tsm *timeseriesMap, current pmetr
if a.useCreatedMetric &&
!currentSum.Flags().NoRecordedValue() &&
currentSum.StartTimestamp() < currentSum.Timestamp() {

continue
}

Expand Down Expand Up @@ -395,6 +397,7 @@ func (a *initialPointAdjuster) adjustMetricSummary(tsm *timeseriesMap, current p
if a.useCreatedMetric &&
!currentSummary.Flags().NoRecordedValue() &&
currentSummary.StartTimestamp() < currentSummary.Timestamp() {

continue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import (
"net/url"
"os"
"strings"
"sync/atomic"
"testing"
"time"

"go.uber.org/atomic"

"github.com/gogo/protobuf/proto"
"github.com/golang/snappy"
"github.com/prometheus/prometheus/model/value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func newTransaction(
settings receiver.CreateSettings,
obsrecv *receiverhelper.ObsReport,
trimSuffixes bool) *transaction {

return &transaction{
ctx: ctx,
families: make(map[scopeID]map[string]*metricFamily),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,6 @@ func TestMetricBuilderSummary(t *testing.T) {
tt.run(t)
})
}

}

type buildTestData struct {
Expand Down Expand Up @@ -1598,5 +1597,4 @@ func assertEquivalentMetrics(t *testing.T, want, got pmetric.Metrics) {
assert.EqualValues(t, wmap, gmap)
}
}

}

0 comments on commit e7fc835

Please sign in to comment.