Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk-trace: use MapRef in SpanStorage #796

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Oct 5, 2024

Benchmarks

Before:

Benchmark                               (backend)   Mode  Cnt      Score      Error   Units
TraceBenchmark.span                           sdk  thrpt   80  37936.668 ± 1867.799   ops/s
TraceBenchmark.span:async                     sdk  thrpt             NaN                ---
TraceBenchmark.span:gc.alloc.rate             sdk  thrpt   80   1721.229 ±   62.352  MB/sec
TraceBenchmark.span:gc.alloc.rate.norm        sdk  thrpt   80  48424.089 ± 2845.034    B/op
TraceBenchmark.span:gc.count                  sdk  thrpt   80     93.000             counts
TraceBenchmark.span:gc.time                   sdk  thrpt   80   5132.000                 ms

After:

Benchmark                               (backend)   Mode  Cnt      Score      Error   Units
TraceBenchmark.span                           sdk  thrpt   80  43930.485 ± 1372.618   ops/s
TraceBenchmark.span:async                     sdk  thrpt             NaN                ---
TraceBenchmark.span:gc.alloc.rate             sdk  thrpt   80   1698.339 ±   59.193  MB/sec
TraceBenchmark.span:gc.alloc.rate.norm        sdk  thrpt   80  40544.982 ±  530.282    B/op
TraceBenchmark.span:gc.count                  sdk  thrpt   80     85.000             counts
TraceBenchmark.span:gc.time                   sdk  thrpt   80   5635.000                 ms

There is ~16% improvement in throughput and ~17% less memory allocation.

oteljava vs SDK

Benchmark                  (backend)   Mode  Cnt      Score      Error   Units
TraceBenchmark.noopScope        noop  thrpt   80  194900.259 ± 4233.790   ops/s
TraceBenchmark.noopScope    oteljava  thrpt   80  167703.033 ± 2820.815   ops/s
TraceBenchmark.noopScope         sdk  thrpt   80  130521.459 ± 5903.623   ops/s
TraceBenchmark.pure             noop  thrpt   80  203382.916 ± 4371.169   ops/s
TraceBenchmark.pure         oteljava  thrpt   80  194281.902 ± 3699.690   ops/s
TraceBenchmark.pure              sdk  thrpt   80  187178.501 ± 5383.391   ops/s
TraceBenchmark.rootScope        noop  thrpt   80  204148.742 ± 3868.173   ops/s
TraceBenchmark.rootScope    oteljava  thrpt   80  103563.256 ± 7134.662   ops/s
TraceBenchmark.rootScope         sdk  thrpt   80   44412.737 ±  952.992   ops/s
TraceBenchmark.span             noop  thrpt   80  202511.661 ± 4672.375   ops/s
TraceBenchmark.span         oteljava  thrpt   80  113092.272 ± 7984.096   ops/s
TraceBenchmark.span              sdk  thrpt   80   45129.609 ± 1034.677   ops/s

@iRevive iRevive added module:sdk Features and improvements to the sdk module performance Performance improvements labels Oct 5, 2024
@iRevive iRevive changed the title sdk-trace: use SpanStorage explicitly sdk-trace: use SpanStorage internally Oct 5, 2024
@iRevive iRevive changed the title sdk-trace: use SpanStorage internally sdk-trace: use MapRef in SpanStorage Oct 6, 2024
@iRevive iRevive merged commit 2171738 into typelevel:main Oct 8, 2024
10 checks passed
@iRevive iRevive deleted the benchmarks/trace branch October 8, 2024 06:54
@iRevive iRevive added the breaking The changes are semantically or binary breaking label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking The changes are semantically or binary breaking module:sdk Features and improvements to the sdk module performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant