Attempt at fixing the memory usage in CI (#19171)

- Do not keep many intervals of the in memory sink metrics
   collector. Otherwise we fill up the CI's memory
This commit is contained in:
Steven Clark 2023-02-14 08:40:25 -05:00 committed by GitHub
parent 2c32190eed
commit 225dd869d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -421,8 +421,8 @@ func TestCertStorageMetrics(t *testing.T) {
// We set up a metrics accumulator
inmemSink := metrics.NewInmemSink(
2*newPeriod, // A short time period is ideal here to test metrics are emitted every periodic func
2000000*time.Hour)
2*newPeriod, // A short time period is ideal here to test metrics are emitted every periodic func
10*newPeriod) // Do not keep a huge amount of metrics in the sink forever, clear them out to save memory usage.
metricsConf := metrics.DefaultConfig("")
metricsConf.EnableHostname = false