Skip to content

Commit

Permalink
fix some linting
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Jul 11, 2024
1 parent 5563d53 commit 3eaa00b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/pattern/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (i *Ingester) loop() {
defer flushTicker.Stop()

if i.cfg.MetricAggregation.Enabled {
downsampleTicker := time.NewTimer(i.cfg.MetricAggregation.DownsamplePeriod)
downsampleTicker := time.NewTimer(i.cfg.MetricAggregation.DownsamplePeriod)
defer downsampleTicker.Stop()

for {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pattern/metric/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func NewChunks(labels labels.Labels, chunkMetrics *ChunkMetrics, logger log.Logg
}
}

func (c *Chunks) Observe(bytes, count float64, ts model.Time) {
func (c *Chunks) Observe(bytes, count float64) {
c.lock.Lock()
defer c.lock.Unlock()

Expand Down
6 changes: 3 additions & 3 deletions pkg/pattern/metric/chunk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ func TestDownsample(t *testing.T) {
labels.Label{Name: "foo", Value: "bar"},
}, NewChunkMetrics(nil, "test"), log.NewNopLogger())

c.Observe(2.0, 1.0, 1000)
c.Observe(2.0, 1.0, 2000)
c.Observe(2.0, 1.0, 3000)
c.Observe(2.0, 1.0)
c.Observe(2.0, 1.0)
c.Observe(2.0, 1.0)

now := model.Time(5000)
// Call the Downsample function
Expand Down
2 changes: 1 addition & 1 deletion pkg/pattern/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (s *stream) Push(
"sample_ts_ns", s.lastTs,
)
}
s.chunks.Observe(bytes, count, model.TimeFromUnixNano(s.lastTs))
s.chunks.Observe(bytes, count)
}
return nil
}
Expand Down

0 comments on commit 3eaa00b

Please sign in to comment.