You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
3264bf171b
Enable the [`modernize`](https://golangci-lint.run/docs/linters/configuration/#modernize) linter in the golangci-lint configuration and fix the reported issues by running `golangci-lint run --enable-only modernize --fix`. The `modernize` linter is internally the same as [gopls modernize](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize). Similar to #7089.
22 lines
411 B
Go
22 lines
411 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package global
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func BenchmarkStartEndSpanNoSDK(b *testing.B) {
|
|
// Compare with BenchmarkStartEndSpan() in
|
|
// ../../sdk/trace/benchmark_test.go.
|
|
ResetForTest(b)
|
|
t := TracerProvider().Tracer("Benchmark StartEndSpan")
|
|
ctx := b.Context()
|
|
|
|
for b.Loop() {
|
|
_, span := t.Start(ctx, "/foo")
|
|
span.End()
|
|
}
|
|
}
|