Skip to content

Commit

Permalink
Remove BenchmarkOTLPTraces
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Feb 21, 2024
1 parent cb577b6 commit cd9433b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cmd/apmbench/bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.uber.org/zap"
"golang.org/x/time/rate"
"google.golang.org/grpc"
Expand Down Expand Up @@ -50,27 +49,6 @@ func Benchmark1000Transactions(b *testing.B, l *rate.Limiter) {
})
}

func BenchmarkOTLPTraces(b *testing.B, l *rate.Limiter) {
b.RunParallel(func(pb *testing.PB) {
exporter := newOTLPExporter(b)
tracerProvider := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter, sdktrace.WithBlocking()),
)
tracer := tracerProvider.Tracer("tracer")
for pb.Next() {
if err := l.Wait(context.Background()); err != nil {
// panicing ensures that the error is reported
// see: https://github.com/golang/go/issues/32066
panic(err)
}
_, span := tracer.Start(context.Background(), "name")
span.End()
}
tracerProvider.ForceFlush(context.Background())
})
}

func BenchmarkAgentAll(b *testing.B, l *rate.Limiter) {
benchmarkAgent(b, l, `apm-*.ndjson`)
}
Expand Down

0 comments on commit cd9433b

Please sign in to comment.