Skip to content

test(tracing): Add benchmark tests to the repository for reference#4504

Open
thrivikram-karur-g wants to merge 4 commits intomasterfrom
vikram-benchmark-tests
Open

test(tracing): Add benchmark tests to the repository for reference#4504
thrivikram-karur-g wants to merge 4 commits intomasterfrom
vikram-benchmark-tests

Conversation

@thrivikram-karur-g
Copy link
Contributor

@thrivikram-karur-g thrivikram-karur-g commented Mar 20, 2026

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

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - NA

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

@thrivikram-karur-g thrivikram-karur-g requested a review from a team as a code owner March 20, 2026 04:29
@github-actions github-actions bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Mar 20, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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

  • New Benchmark Tests: Added a new file, tracing/benchmark_test.go, containing performance benchmarks for the tracing package.
  • Tracer Coverage: Benchmarks were introduced for both OpenTelemetry (Otel) and No-op tracer implementations.
  • Key Operations Benchmarked: Specific operations like StartSpan, StartServerSpan, RecordError, SetCacheReadAttributes, and PropagateTraceContext are now benchmarked.
  • Parallel Benchmarking: Included a parallel benchmark for OtelTraceHandle.SetCacheReadAttributes to assess concurrent performance.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@thrivikram-karur-g thrivikram-karur-g requested review from kislaykishore and removed request for abhishek10004 March 20, 2026 04:36
@thrivikram-karur-g
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.70%. Comparing base (8b5e5de) to head (055b965).

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     
Flag Coverage Δ
unittests 83.70% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant