Skip to content

Instantly share code, notes, and snippets.

@MadVikingGod
Created February 14, 2024 15:53
Show Gist options
  • Save MadVikingGod/7fd77d87c582358e23c305901cd1c4eb to your computer and use it in GitHub Desktop.
Save MadVikingGod/7fd77d87c582358e23c305901cd1c4eb to your computer and use it in GitHub Desktop.
Comparision of otel benchmarks
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkHTTPServerRequest-2 1353092 874.0 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1627888 735.7 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1556690 820.0 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1347495 752.0 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1502954 769.7 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1501928 816.1 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1444436 696.2 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1784112 937.3 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1491276 799.0 ns/op 1540 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 1512571 962.5 ns/op 1540 B/op 2 allocs/op
PASS
ok go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv 20.795s
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkHTTPServerRequest-2 2705725 451.9 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2740026 462.3 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2710486 437.4 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2312277 441.7 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2353788 438.6 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2322390 509.7 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2637547 510.4 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2744433 475.4 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2457279 555.9 ns/op 708 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2463056 438.5 ns/op 708 B/op 2 allocs/op
PASS
ok go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv 23.215s
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkHTTPServerRequest-2 2433680 497.3 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2704322 614.2 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2724110 451.4 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2672256 501.8 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2705716 444.7 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2485672 540.5 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2183974 523.1 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2288862 487.0 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2036473 671.7 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2292386 507.8 ns/op 644 B/op 2 allocs/op
PASS
ok go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv 23.176s
# Note I changed the package name to be able to compare with the new package
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkHTTPServerRequest-2 1983244 538.5 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2816106 434.7 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2541564 488.9 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2713104 428.1 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2523554 690.9 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2794316 488.4 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2795088 442.0 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2216140 569.8 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2767362 468.5 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequest-2 2347869 433.3 ns/op 644 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4374397 317.4 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4799472 250.7 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4515171 273.5 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4121031 302.0 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4178361 286.4 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4822059 247.6 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4907568 314.4 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4733641 268.6 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4670625 252.4 ns/op 388 B/op 2 allocs/op
BenchmarkHTTPServerRequestMetrics-2 4797505 328.2 ns/op 388 B/op 2 allocs/op
PASS
ok go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil 38.169s
benchstat bench-old.txt bench-new.txt bench-dup.txt
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
│ bench-old.txt │ bench-new.txt │ bench-dup.txt │
│ sec/op │ sec/op vs base │ sec/op vs base │
HTTPServerRequest-2 504.8n ± 22% 457.1n ± 12% ~ (p=0.075 n=10) 807.6n ± 16% +59.97% (p=0.000 n=10)
│ bench-old.txt │ bench-new.txt │ bench-dup.txt │
│ B/op │ B/op vs base │ B/op vs base │
HTTPServerRequest-2 644.0 ± 0% 708.0 ± 0% +9.94% (p=0.000 n=10) 1540.0 ± 0% +139.13% (p=0.000 n=10)
│ bench-old.txt │ bench-new.txt │ bench-dup.txt │
│ allocs/op │ allocs/op vs base │ allocs/op vs base │
HTTPServerRequest-2 2.000 ± 0% 2.000 ± 0% ~ (p=1.000 n=10) ¹ 2.000 ± 0% ~ (p=1.000 n=10) ¹
¹ all samples are equal
benchstat bench-orig.txt bench-old.txt
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
cpu: AMD EPYC 7763 64-Core Processor
│ bench-orig.txt │ bench-old.txt │
│ sec/op │ sec/op vs base │
HTTPServerRequest-2 478.5n ± 19% 504.8n ± 22% ~ (p=0.218 n=10)
HTTPServerRequestMetrics-2 279.9n ± 13%
geomean 366.0n 504.8n +5.51% ¹
¹ benchmark set differs from baseline; geomeans may not be comparable
│ bench-orig.txt │ bench-old.txt │
│ B/op │ B/op vs base │
HTTPServerRequest-2 644.0 ± 0% 644.0 ± 0% ~ (p=1.000 n=10) ¹
HTTPServerRequestMetrics-2 388.0 ± 0%
geomean 499.9 644.0 +0.00% ²
¹ all samples are equal
² benchmark set differs from baseline; geomeans may not be comparable
│ bench-orig.txt │ bench-old.txt │
│ allocs/op │ allocs/op vs base │
HTTPServerRequest-2 2.000 ± 0% 2.000 ± 0% ~ (p=1.000 n=10) ¹
HTTPServerRequestMetrics-2 2.000 ± 0%
geomean 2.000 2.000 +0.00% ²
¹ all samples are equal
² benchmark set differs from baseline; geomeans may not be comparable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment