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

Reduce overhead of unsampled requests #3681

Merged
merged 3 commits into from
Jul 28, 2021

Conversation

trask
Copy link
Member

@trask trask commented Jul 27, 2021

#3678 shows that HandlerMappingResourceNameFilter.findMapping is expensive, so easy win to hide it behind isRecording check

Benchmark                                                               Score       Error   Units
ServletBenchmark.execute                                              105.731 ±     0.066   us/op
ServletBenchmark.execute:execute·p0.50                                102.272               us/op
ServletBenchmark.execute:·gc.alloc.rate.norm                        47349.318 ± 12700.246    B/op
ServletWithAgentDisabledBenchmark.execute                              90.191 ±     0.058   us/op
ServletWithAgentDisabledBenchmark.execute:execute·p0.50                87.552               us/op
ServletWithAgentDisabledBenchmark.execute:·gc.alloc.rate.norm       44087.647 ± 11458.853    B/op
ServletWithNoopApiBenchmark.execute                                   100.375 ±     0.062   us/op
ServletWithNoopApiBenchmark.execute:execute·p0.50                      97.024               us/op
ServletWithNoopApiBenchmark.execute:·gc.alloc.rate.norm             46146.656 ± 12239.658    B/op
ServletWithOnePercentSamplingBenchmark.execute                        103.976 ±     0.065   us/op
ServletWithOnePercentSamplingBenchmark.execute:execute·p0.50          100.608               us/op
ServletWithOnePercentSamplingBenchmark.execute:·gc.alloc.rate.norm  46809.705 ± 12494.367    B/op

after:

Benchmark                                                               Score       Error   Units
ServletBenchmark.execute                                              105.396 ±     0.066   us/op
ServletBenchmark.execute:execute·p0.50                                102.144               us/op
ServletBenchmark.execute:·gc.alloc.rate.norm                        47354.717 ± 12704.220    B/op
ServletWithAgentDisabledBenchmark.execute                              90.639 ±     0.059   us/op
ServletWithAgentDisabledBenchmark.execute:execute·p0.50                88.064               us/op
ServletWithAgentDisabledBenchmark.execute:·gc.alloc.rate.norm       44008.361 ± 11427.639    B/op
ServletWithNoopApiBenchmark.execute                                    97.427 ±     0.060   us/op
ServletWithNoopApiBenchmark.execute:execute·p0.50                      94.592               us/op
ServletWithNoopApiBenchmark.execute:·gc.alloc.rate.norm             45225.107 ± 11889.072    B/op
ServletWithOnePercentSamplingBenchmark.execute                        101.981 ±     0.063   us/op
ServletWithOnePercentSamplingBenchmark.execute:execute·p0.50           99.072               us/op
ServletWithOnePercentSamplingBenchmark.execute:·gc.alloc.rate.norm  45918.495 ± 12155.446    B/op

@trask trask merged commit 91b302a into open-telemetry:main Jul 28, 2021
@trask trask deleted the optimize-sampled-out-requests branch July 28, 2021 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants