test(tracing): Add benchmark tests to the repository for reference#4504
test(tracing): Add benchmark tests to the repository for reference#4504thrivikram-karur-g wants to merge 4 commits intomasterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a comprehensive set of benchmark tests for the tracing package. The primary goal is to establish performance baselines for both OpenTelemetry and No-op tracer functionalities, allowing for a clear understanding of their overhead and providing a foundation for future performance optimizations and regressions detection. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a suite of benchmark tests for the tracing package, covering both the OTEL tracer and the no-op tracer. The benchmarks are a good addition for performance monitoring. My review found one issue in the parallel benchmark for the no-op tracer, where it was incorrectly using the OTEL tracer handle. I've suggested a fix to align the implementation with its intended purpose.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds benchmark tests for the tracing package. The implementation is mostly correct, but I've found a critical data race issue in one of the parallel benchmarks due to incorrect sharing of a trace.Span object across multiple goroutines. A fix is suggested to resolve this race condition.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4504 +/- ##
==========================================
+ Coverage 83.67% 83.70% +0.02%
==========================================
Files 163 163
Lines 20089 20089
==========================================
+ Hits 16810 16816 +6
+ Misses 2653 2648 -5
+ Partials 626 625 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
Description
Add benchmark tests to the repository for reference.
Ran benchmarks and below is the output.
goos: linux
goarch: amd64
pkg: github.com/googlecloudplatform/gcsfuse/v3/tracing
cpu: Intel(R) Xeon(R) CPU @ 2.80GHz
BenchmarkOtelTracerSetCacheReadAttributes-64 54903170 21.74 ns/op 0 B/op 0 allocs/op
BenchmarkNoopTracerStartSpan-64 446513634 2.686 ns/op 0 B/op 0 allocs/op
BenchmarkNoopTracerStartServerSpan-64 447354768 2.681 ns/op 0 B/op 0 allocs/op
BenchmarkNoopTracerRecordError-64 803381400 1.492 ns/op 0 B/op 0 allocs/op
BenchmarkNoopTracerSetCacheReadAttributes-64 665446935 1.797 ns/op 0 B/op 0 allocs/op
BenchmarkNoopTracerPropagateTraceContext-64 791744840 1.512 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/googlecloudplatform/gcsfuse/v3/tracing 7.199s
Link to the issue in case of a bug fix.
b/490302363
Testing details
Added benchmark tests for reference. Ran them locally and pasted the result in the description with machine details as well.
Any backward incompatible change? If so, please explain.
N/A