mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> Bumps size to 2k on some benchmarks to hopefully make those benchmarks more reliable. Skips a bunch of other benchmarks that are allocation-heavy and currently are more noise than signal. #### Link to tracking issue Relates to #14257
27 lines
896 B
Go
27 lines
896 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package testutil // import "go.opentelemetry.io/collector/internal/testutil"
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// SkipMemoryBench will skip memory benchmarks on CI, as we currently only
|
|
// monitor duration.
|
|
func SkipMemoryBench(b *testing.B) {
|
|
if os.Getenv("MEMBENCH") == "" {
|
|
b.Skip("Skipping since the 'MEMBENCH' environment variable was not set")
|
|
}
|
|
}
|
|
|
|
// SkipGCHeavyBench will skip GC-heavy benchmarks on CI.
|
|
// These benchmarks tend to be flaky with the current settings since garbage
|
|
// collection pauses can take ~50ms which is significant with the current benchmark times.
|
|
func SkipGCHeavyBench(b *testing.B) {
|
|
if os.Getenv("GCHEAVYBENCH") == "" {
|
|
b.Skip("Skipping since the 'GCHEAVYBENCH' environment variable was not set. See https://github.com/open-telemetry/opentelemetry-collector/issues/14257.")
|
|
}
|
|
}
|