1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-28 21:09:17 +02:00
opentelemetry-go/sdk/trace
Damien Mathieu ae6d29f4b1
Refactor Batch Processor benchmark to really test OnEnd (#5600)
This benchmark was not only testing the batch processor, since it was
starting a span, and ending it.
So the entire process of recording span was being accounted.

This changes the benchmark to only account for the batch processor being
tested, not the entire stack.

Before:
```
pkg: go.opentelemetry.io/otel/sdk/trace
BenchmarkSpanProcessor-10                         137320              8696 ns/op           11184 B/op        155 allocs/op
BenchmarkSpanProcessorVerboseLogging-10           135483              8881 ns/op           11184 B/op        155 allocs/op
PASS
ok      go.opentelemetry.io/otel/sdk/trace      3.984s
```

After:
```
pkg: go.opentelemetry.io/otel/sdk/trace
BenchmarkSpanProcessorOnEnd/batch:_10,_spans:_10-10              6055572               173.2 ns/op             0 B/op          0 allocs/op
BenchmarkSpanProcessorOnEnd/batch:_10,_spans:_100-10              684236              1733 ns/op               0 B/op          0 allocs/op
BenchmarkSpanProcessorOnEnd/batch:_100,_spans:_10-10             6930391               173.8 ns/op             0 B/op          0 allocs/op
BenchmarkSpanProcessorOnEnd/batch:_100,_spans:_100-10             677128              1731 ns/op               0 B/op          0 allocs/op
BenchmarkSpanProcessorVerboseLogging-10                           128823              9318 ns/op           11184 B/op        155 allocs/op
PASS
ok      go.opentelemetry.io/otel/sdk/trace      6.763s
```

I haven't touched the verbose logging benchmark, as I suppose a
benchmark with verbose logging could actually benefit from the entire
stack.
I also feel one benchmark testing the entire stack up to there could be
nice.
2024-07-16 09:22:04 +02:00
..
tracetest Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
batch_span_processor_test.go Refactor Batch Processor benchmark to really test OnEnd (#5600) 2024-07-16 09:22:04 +02:00
batch_span_processor.go Add unparam linter (#5531) 2024-06-21 16:02:07 -07:00
benchmark_test.go Add unparam linter (#5531) 2024-06-21 16:02:07 -07:00
doc.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
event.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
evictedqueue_test.go trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. (#5497) 2024-06-17 07:39:03 -07:00
evictedqueue.go trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. (#5497) 2024-06-17 07:39:03 -07:00
id_generator_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
id_generator.go Fix IDGenerator may generate zero TraceId / SpanId (#5514) 2024-06-18 15:57:45 -07:00
link.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
provider_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
provider.go Add errorlint linter (#5535) 2024-06-25 10:55:00 -07:00
README.md Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
sampler_env.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
sampling_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
sampling.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
simple_span_processor_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
simple_span_processor.go sdk/trace: fix spelling errors (#4996) 2024-03-25 13:10:08 +01:00
snapshot.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_exporter.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_limits_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_limits.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_annotator_example_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_filter_example_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_test.go Split the span start/end benchmarks and test start with links and attributes (#5554) 2024-06-28 11:51:09 +02:00
span.go Upgrade semconv use to v1.26.0 (#5490) 2024-06-06 09:36:59 -07:00
trace_test.go Split the span start/end benchmarks and test start with links and attributes (#5554) 2024-06-28 11:51:09 +02:00
tracer.go trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. (#5497) 2024-06-17 07:39:03 -07:00
util_test.go Add unparam linter (#5531) 2024-06-21 16:02:07 -07:00
version_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
version.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00

SDK Trace

PkgGoDev