diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 91f3927c4b86..5c0223ea06bb 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -15,7 +15,6 @@ dist: extensions: - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.107.0 diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 4e8a69192a49..9faff07ed517 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -12,7 +12,6 @@ import ( otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" - ballastextension "go.opentelemetry.io/collector/extension/ballastextension" zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" @@ -225,7 +224,6 @@ func components() (otelcol.Factories, error) { factories.Extensions, err = extension.MakeFactoryMap( zpagesextension.NewFactory(), - ballastextension.NewFactory(), ackextension.NewFactory(), asapauthextension.NewFactory(), awsproxy.NewFactory(), @@ -265,7 +263,6 @@ func components() (otelcol.Factories, error) { } factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions)) factories.ExtensionModules[zpagesextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/zpagesextension v0.107.0" - factories.ExtensionModules[ballastextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/ballastextension v0.107.0" factories.ExtensionModules[ackextension.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.107.0" factories.ExtensionModules[asapauthextension.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.107.0" factories.ExtensionModules[awsproxy.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.107.0" diff --git a/cmd/otelcontribcol/extensions_test.go b/cmd/otelcontribcol/extensions_test.go index 526db82353c7..c7b9c6f2422d 100644 --- a/cmd/otelcontribcol/extensions_test.go +++ b/cmd/otelcontribcol/extensions_test.go @@ -16,7 +16,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/extension/ballastextension" "go.opentelemetry.io/collector/extension/extensiontest" "go.opentelemetry.io/collector/extension/zpagesextension" @@ -116,13 +115,6 @@ func TestDefaultExtensions(t *testing.T) { return cfg }, }, - { - extension: "memory_ballast", - getConfigFn: func() component.Config { - cfg := extFactories["memory_ballast"].CreateDefaultConfig().(*ballastextension.Config) - return cfg - }, - }, { extension: "asapclient", getConfigFn: func() component.Config { diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index ee4a62bf0d94..bc676df9de31 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -227,7 +227,6 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.107.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.107.0 go.opentelemetry.io/collector/extension v0.107.0 - go.opentelemetry.io/collector/extension/ballastextension v0.107.0 go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 go.opentelemetry.io/collector/otelcol v0.107.0 go.opentelemetry.io/collector/pdata v1.13.0 diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index ecd6a80ad1cb..ca662a707d8f 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -2415,8 +2415,6 @@ go.opentelemetry.io/collector/extension v0.107.0 h1:wstZXb24RwdcchZu3juTH9M0xryK go.opentelemetry.io/collector/extension v0.107.0/go.mod h1:w/+HXzRO7jPutUIMyBlzX6deUPl205QCEwteB0YgWOg= go.opentelemetry.io/collector/extension/auth v0.107.0 h1:xv+MI9ce8RG1UP4XihTaPR3pCKVvKOl2iIyFqYa0bvE= go.opentelemetry.io/collector/extension/auth v0.107.0/go.mod h1:tFMzaKaUAx3eWpp3lOLZ8OcLbryydyof9+GCvCWmKmU= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0 h1:tiUYHWF98dY6hARwVZNxpE6FAlFO/Fbqd5hnfohf2JE= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0/go.mod h1:pSf/cCGvJd4tu47lurRrqOMFCjtz8iXqBwIn45T3fec= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 h1:8FnYaGsnoBvjV2yZhlqmajsyYYqxKZV8dsIfkGAwU7c= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0/go.mod h1:ei9f4RsyYGfA9rJJ72zsgNLP5kZ+n5odzAti/Dp8dss= go.opentelemetry.io/collector/featuregate v1.13.0 h1:rc84eCf5hesXQ8/bP6Zc15wqthbomfLBHmox5tT7AwM= diff --git a/cmd/oteltestbedcol/builder-config.yaml b/cmd/oteltestbedcol/builder-config.yaml index 89853d8259ea..855ac0bf7dd2 100644 --- a/cmd/oteltestbedcol/builder-config.yaml +++ b/cmd/oteltestbedcol/builder-config.yaml @@ -11,7 +11,6 @@ dist: otelcol_version: 0.107.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.107.0 - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.107.0 diff --git a/cmd/oteltestbedcol/components.go b/cmd/oteltestbedcol/components.go index 725d38352c87..c4d6db10d528 100644 --- a/cmd/oteltestbedcol/components.go +++ b/cmd/oteltestbedcol/components.go @@ -10,7 +10,6 @@ import ( otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" - ballastextension "go.opentelemetry.io/collector/extension/ballastextension" zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" @@ -52,7 +51,6 @@ func components() (otelcol.Factories, error) { factories := otelcol.Factories{} factories.Extensions, err = extension.MakeFactoryMap( - ballastextension.NewFactory(), zpagesextension.NewFactory(), pprofextension.NewFactory(), filestorage.NewFactory(), @@ -61,7 +59,6 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions)) - factories.ExtensionModules[ballastextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/ballastextension v0.107.0" factories.ExtensionModules[zpagesextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/zpagesextension v0.107.0" factories.ExtensionModules[pprofextension.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.107.0" factories.ExtensionModules[filestorage.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.107.0" diff --git a/cmd/oteltestbedcol/go.mod b/cmd/oteltestbedcol/go.mod index 7f9d717dfe5e..edf837a497e0 100644 --- a/cmd/oteltestbedcol/go.mod +++ b/cmd/oteltestbedcol/go.mod @@ -46,7 +46,6 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.107.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.107.0 go.opentelemetry.io/collector/extension v0.107.0 - go.opentelemetry.io/collector/extension/ballastextension v0.107.0 go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 go.opentelemetry.io/collector/otelcol v0.107.0 go.opentelemetry.io/collector/processor v0.107.0 diff --git a/cmd/oteltestbedcol/go.sum b/cmd/oteltestbedcol/go.sum index 56c1759d7e07..01b38c72f0ec 100644 --- a/cmd/oteltestbedcol/go.sum +++ b/cmd/oteltestbedcol/go.sum @@ -747,8 +747,6 @@ go.opentelemetry.io/collector/extension v0.107.0 h1:wstZXb24RwdcchZu3juTH9M0xryK go.opentelemetry.io/collector/extension v0.107.0/go.mod h1:w/+HXzRO7jPutUIMyBlzX6deUPl205QCEwteB0YgWOg= go.opentelemetry.io/collector/extension/auth v0.107.0 h1:xv+MI9ce8RG1UP4XihTaPR3pCKVvKOl2iIyFqYa0bvE= go.opentelemetry.io/collector/extension/auth v0.107.0/go.mod h1:tFMzaKaUAx3eWpp3lOLZ8OcLbryydyof9+GCvCWmKmU= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0 h1:tiUYHWF98dY6hARwVZNxpE6FAlFO/Fbqd5hnfohf2JE= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0/go.mod h1:pSf/cCGvJd4tu47lurRrqOMFCjtz8iXqBwIn45T3fec= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 h1:8FnYaGsnoBvjV2yZhlqmajsyYYqxKZV8dsIfkGAwU7c= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0/go.mod h1:ei9f4RsyYGfA9rJJ72zsgNLP5kZ+n5odzAti/Dp8dss= go.opentelemetry.io/collector/featuregate v1.13.0 h1:rc84eCf5hesXQ8/bP6Zc15wqthbomfLBHmox5tT7AwM= diff --git a/confmap/provider/s3provider/testdata/otel-config.yaml b/confmap/provider/s3provider/testdata/otel-config.yaml index 8505ef559360..dca6c9a98041 100644 --- a/confmap/provider/s3provider/testdata/otel-config.yaml +++ b/confmap/provider/s3provider/testdata/otel-config.yaml @@ -1,6 +1,4 @@ extensions: - memory_ballast: - size_mib: 512 zpages: endpoint: 0.0.0.0:55679 @@ -34,4 +32,4 @@ service: processors: [memory_limiter, batch] exporters: [debug] - extensions: [memory_ballast, zpages] + extensions: [zpages] diff --git a/exporter/clickhouseexporter/example/otel-collector-config.yml b/exporter/clickhouseexporter/example/otel-collector-config.yml index e6c13dd5d7b3..535490d19f7b 100644 --- a/exporter/clickhouseexporter/example/otel-collector-config.yml +++ b/exporter/clickhouseexporter/example/otel-collector-config.yml @@ -41,8 +41,6 @@ extensions: health_check: pprof: zpages: - memory_ballast: - size_mib: 1000 service: extensions: [ pprof, zpages, health_check ] diff --git a/exporter/elasticsearchexporter/integrationtest/go.mod b/exporter/elasticsearchexporter/integrationtest/go.mod index 380bfe07f521..086d05ed97fc 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.mod +++ b/exporter/elasticsearchexporter/integrationtest/go.mod @@ -146,7 +146,6 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.107.0 // indirect go.opentelemetry.io/collector/exporter/otlphttpexporter v0.107.0 // indirect go.opentelemetry.io/collector/extension/auth v0.107.0 // indirect - go.opentelemetry.io/collector/extension/ballastextension v0.107.0 // indirect go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 // indirect go.opentelemetry.io/collector/featuregate v1.13.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.107.0 // indirect diff --git a/exporter/elasticsearchexporter/integrationtest/go.sum b/exporter/elasticsearchexporter/integrationtest/go.sum index 446caaab104c..9d61015da5b8 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.sum +++ b/exporter/elasticsearchexporter/integrationtest/go.sum @@ -324,8 +324,6 @@ go.opentelemetry.io/collector/extension v0.107.0 h1:wstZXb24RwdcchZu3juTH9M0xryK go.opentelemetry.io/collector/extension v0.107.0/go.mod h1:w/+HXzRO7jPutUIMyBlzX6deUPl205QCEwteB0YgWOg= go.opentelemetry.io/collector/extension/auth v0.107.0 h1:xv+MI9ce8RG1UP4XihTaPR3pCKVvKOl2iIyFqYa0bvE= go.opentelemetry.io/collector/extension/auth v0.107.0/go.mod h1:tFMzaKaUAx3eWpp3lOLZ8OcLbryydyof9+GCvCWmKmU= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0 h1:tiUYHWF98dY6hARwVZNxpE6FAlFO/Fbqd5hnfohf2JE= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0/go.mod h1:pSf/cCGvJd4tu47lurRrqOMFCjtz8iXqBwIn45T3fec= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 h1:8FnYaGsnoBvjV2yZhlqmajsyYYqxKZV8dsIfkGAwU7c= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0/go.mod h1:ei9f4RsyYGfA9rJJ72zsgNLP5kZ+n5odzAti/Dp8dss= go.opentelemetry.io/collector/featuregate v1.13.0 h1:rc84eCf5hesXQ8/bP6Zc15wqthbomfLBHmox5tT7AwM= diff --git a/exporter/sapmexporter/examples/signalfx-k8s.yaml b/exporter/sapmexporter/examples/signalfx-k8s.yaml index 25f6497eba85..d660306fe566 100644 --- a/exporter/sapmexporter/examples/signalfx-k8s.yaml +++ b/exporter/sapmexporter/examples/signalfx-k8s.yaml @@ -134,8 +134,6 @@ spec: - command: - "/otelcontribcol" - "--config=/conf/otel-collector-config.yaml" -# Memory Ballast size should be max 1/3 to 1/2 of memory. - - "--mem-ballast-size-mib=683" image: otel/opentelemetry-collector-contrib:0.12.0 name: otel-collector resources: diff --git a/internal/buildscripts/modules b/internal/buildscripts/modules index 7d6942deadb2..446eaab1ee35 100644 --- a/internal/buildscripts/modules +++ b/internal/buildscripts/modules @@ -20,7 +20,6 @@ beta_modules=( "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" "go.opentelemetry.io/collector/extension/auth" - "go.opentelemetry.io/collector/extension/ballastextension" "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" diff --git a/testbed/go.mod b/testbed/go.mod index 07d0a934fb1a..9adba0a8c34e 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -51,7 +51,6 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.107.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.107.0 go.opentelemetry.io/collector/extension v0.107.0 - go.opentelemetry.io/collector/extension/ballastextension v0.107.0 go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 go.opentelemetry.io/collector/otelcol v0.107.0 go.opentelemetry.io/collector/pdata v1.13.0 diff --git a/testbed/go.sum b/testbed/go.sum index 1b9d46a8fa33..8a8948921aa0 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -738,8 +738,6 @@ go.opentelemetry.io/collector/extension v0.107.0 h1:wstZXb24RwdcchZu3juTH9M0xryK go.opentelemetry.io/collector/extension v0.107.0/go.mod h1:w/+HXzRO7jPutUIMyBlzX6deUPl205QCEwteB0YgWOg= go.opentelemetry.io/collector/extension/auth v0.107.0 h1:xv+MI9ce8RG1UP4XihTaPR3pCKVvKOl2iIyFqYa0bvE= go.opentelemetry.io/collector/extension/auth v0.107.0/go.mod h1:tFMzaKaUAx3eWpp3lOLZ8OcLbryydyof9+GCvCWmKmU= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0 h1:tiUYHWF98dY6hARwVZNxpE6FAlFO/Fbqd5hnfohf2JE= -go.opentelemetry.io/collector/extension/ballastextension v0.107.0/go.mod h1:pSf/cCGvJd4tu47lurRrqOMFCjtz8iXqBwIn45T3fec= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 h1:8FnYaGsnoBvjV2yZhlqmajsyYYqxKZV8dsIfkGAwU7c= go.opentelemetry.io/collector/extension/zpagesextension v0.107.0/go.mod h1:ei9f4RsyYGfA9rJJ72zsgNLP5kZ+n5odzAti/Dp8dss= go.opentelemetry.io/collector/featuregate v1.13.0 h1:rc84eCf5hesXQ8/bP6Zc15wqthbomfLBHmox5tT7AwM= diff --git a/testbed/testbed/components.go b/testbed/testbed/components.go index cd817d268ec5..c45a19456c10 100644 --- a/testbed/testbed/components.go +++ b/testbed/testbed/components.go @@ -10,7 +10,6 @@ import ( "go.opentelemetry.io/collector/exporter/otlpexporter" "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/extension/ballastextension" "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" "go.opentelemetry.io/collector/processor" @@ -40,7 +39,6 @@ func Components() ( extensions, err := extension.MakeFactoryMap( zpagesextension.NewFactory(), - ballastextension.NewFactory(), ) errs = multierr.Append(errs, err) diff --git a/testbed/tests/e2e_test.go b/testbed/tests/e2e_test.go index 1eeabb9ddafc..6d1b6800dcc3 100644 --- a/testbed/tests/e2e_test.go +++ b/testbed/tests/e2e_test.go @@ -7,12 +7,9 @@ package tests import ( - "fmt" "path/filepath" "testing" - "time" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" @@ -51,87 +48,3 @@ func TestIdleMode(t *testing.T) { tc.Sleep(tc.Duration) } - -const ballastConfig = ` - memory_ballast: - size_mib: %d -` - -func TestBallastMemory(t *testing.T) { - tests := []struct { - ballastSize uint32 - maxRSS uint32 - }{ - {100, 80}, - {500, 110}, - {1000, 120}, - } - - resultDir, err := filepath.Abs(filepath.Join("results", t.Name())) - require.NoError(t, err) - - options := testbed.LoadOptions{DataItemsPerSecond: 10_000, ItemsPerBatch: 10} - dataProvider := testbed.NewPerfTestDataProvider(options) - for _, test := range tests { - t.Run(fmt.Sprintf("ballast-size-%d", test.ballastSize), func(t *testing.T) { - sender := testbed.NewOTLPTraceDataSender(testbed.DefaultHost, testutil.GetAvailablePort(t)) - receiver := testbed.NewOTLPDataReceiver(testutil.GetAvailablePort(t)) - ballastCfg := createConfigYaml( - t, sender, receiver, resultDir, nil, - map[string]string{"memory_ballast": fmt.Sprintf(ballastConfig, test.ballastSize)}) - cp := testbed.NewChildProcessCollector(testbed.WithEnvVar("GOMAXPROCS", "2")) - cleanup, err := cp.PrepareConfig(ballastCfg) - require.NoError(t, err) - t.Cleanup(cleanup) - - tc := testbed.NewTestCase( - t, - dataProvider, - sender, - receiver, - cp, - &testbed.PerfTestValidator{}, - performanceResultsSummary, - testbed.WithSkipResults(), - testbed.WithResourceLimits( - testbed.ResourceSpec{ - ExpectedMaxRAM: test.maxRSS, - ResourceCheckPeriod: time.Second, - MaxConsecutiveFailures: 5, - }, - ), - ) - tc.StartAgent() - t.Cleanup(tc.Stop) - - var rss, vms uint32 - // It is possible that the process is not ready or the ballast code path - // is not hit immediately so we give the process up to a couple of seconds - // to fire up and setup ballast. 2 seconds is a long time for this case but - // it is short enough to not be annoying if the test fails repeatedly - tc.WaitForN(func() bool { - rss, vms, _ = tc.AgentMemoryInfo() - return vms > test.ballastSize - }, time.Second*5, fmt.Sprintf("VMS must be greater than %d", test.ballastSize)) - - // https://github.com/open-telemetry/opentelemetry-collector/issues/3233 - // given that the maxRSS isn't an absolute maximum and that the actual maximum might be a bit off, - // we give some room here instead of failing when the memory usage isn't that much higher than the max - lenientMax := 1.1 * float32(test.maxRSS) - - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/6927#issuecomment-1138624098 - // During garbage collection, we may observe the ballast in rss. - // If this happens, adjust the baseline expectation for RSS size and validate that additional memory is - // still within the expected limit. - garbageCollectionMax := lenientMax + float32(test.ballastSize) - - rssTooHigh := fmt.Sprintf("The RSS memory usage (%d) is >10%% higher than the limit (%d).", rss, test.maxRSS) - - if rss > test.ballastSize { - assert.LessOrEqual(t, float32(rss), garbageCollectionMax, rssTooHigh) - } else { - assert.LessOrEqual(t, float32(rss), lenientMax, rssTooHigh) - } - }) - } -} diff --git a/testbed/tests/trace_test.go b/testbed/tests/trace_test.go index 96c7c0dd06ad..aef4184b8773 100644 --- a/testbed/tests/trace_test.go +++ b/testbed/tests/trace_test.go @@ -256,105 +256,6 @@ func TestTrace1kSPSWithAttrs(t *testing.T) { }, nil, nil) } -func TestTraceBallast1kSPSWithAttrs(t *testing.T) { - ballastExtCfg := ` - memory_ballast: - size_mib: 1000` - Scenario1kSPSWithAttrs(t, []string{}, []TestCase{ - // No attributes. - { - attrCount: 0, - attrSizeByte: 0, - expectedMaxCPU: 53, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 100, - attrSizeByte: 50, - expectedMaxCPU: 100, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 10, - attrSizeByte: 1000, - expectedMaxCPU: 100, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 20, - attrSizeByte: 5000, - expectedMaxCPU: 120, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - }, nil, map[string]string{"memory_ballast": ballastExtCfg}) -} - -func TestTraceBallast1kSPSAddAttrs(t *testing.T) { - ballastExtCfg := ` - memory_ballast: - size_mib: 1000` - - attrProcCfg := ` - attributes: - actions: - - key: attrib.key00 - value: 123 - action: insert - - key: attrib.key01 - value: "a small string for this attribute" - action: insert - - key: attrib.key02 - value: true - action: insert - - key: region - value: test-region - action: insert - - key: data-center - value: test-datacenter - action: insert` - - Scenario1kSPSWithAttrs( - t, - []string{}, - []TestCase{ - { - attrCount: 0, - attrSizeByte: 0, - expectedMaxCPU: 60, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 100, - attrSizeByte: 50, - expectedMaxCPU: 80, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 10, - attrSizeByte: 1000, - expectedMaxCPU: 80, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - { - attrCount: 20, - attrSizeByte: 5000, - expectedMaxCPU: 120, - expectedMaxRAM: 2200, - resultsSummary: performanceResultsSummary, - }, - }, - map[string]string{"attributes": attrProcCfg}, - map[string]string{"memory_ballast": ballastExtCfg}, - ) -} - // verifySingleSpan sends a single span to Collector, waits until the span is forwarded // and received by MockBackend and calls user-supplied verification functions on // received span.