Skip to content

Commit

Permalink
Add constant for bucketSize.
Browse files Browse the repository at this point in the history
  • Loading branch information
markusthoemmes committed May 9, 2019
1 parent 217f2c6 commit af9471a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/autoscaler/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const (
// all pods of a revision.
// TODO(yanweiguo): tuning this value. To be based on pod population?
scrapeTickInterval = time.Second / 3

// bucketSize is the size of the buckets of stats we create.
bucketSize = 2 * time.Second
)

// Metric represents a resource to configure the metric collector with.
Expand Down Expand Up @@ -216,7 +219,7 @@ type collection struct {
func newCollection(metric *Metric, scraper StatsScraper, logger *zap.SugaredLogger) *collection {
c := &collection{
metric: metric,
buckets: aggregation.NewTimedFloat64Buckets(2 * time.Second),
buckets: aggregation.NewTimedFloat64Buckets(bucketSize),

stopCh: make(chan struct{}),
}
Expand Down

0 comments on commit af9471a

Please sign in to comment.