Skip to content

[Perf] async void => Task - #4524

Open
benrr101 wants to merge 1 commit into
mainfrom
dev/russellben/perf-async-task
Open

[Perf] async void => Task#4524
benrr101 wants to merge 1 commit into
mainfrom
dev/russellben/perf-async-task

Conversation

@benrr101

Copy link
Copy Markdown
Contributor

Description

🤖 This PR updates the DataTypeReaderAsyncRunner to use Task instead of async void for its benchmarks. According to 🤖 using async void causes BenchmarkDotNet to not properly await the tasks, which might cause issues with we are measuring performance. Since we want to ensure that our measurements are reliable, this will be the base branch for all upcoming perf improvements.

Issues

N/A

@benrr101 benrr101 added this to the 7.1.0-preview3 milestone Aug 10, 2026
@benrr101
benrr101 requested a review from a team as a code owner August 10, 2026 18:29
Copilot AI lite review requested due to automatic review settings August 10, 2026 18:29
@benrr101 benrr101 added the Performance 📈 Issues that are targeted to performance improvements. label Aug 10, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the DataTypeReaderAsyncRunner BenchmarkDotNet benchmarks to return Task instead of using async void, ensuring BenchmarkDotNet can properly await asynchronous benchmark execution and produce reliable measurements.

Changes:

  • Converted all async benchmark entrypoints from public static async void ... => await ... to public static Task ... => ....
  • Removed unnecessary async/await wrappers in benchmark methods while preserving the underlying async benchmark implementation (RunBenchmarkAsync).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.74%. Comparing base (9b20e5e) to head (ccad6e8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4524      +/-   ##
==========================================
- Coverage   64.73%   62.74%   -1.99%     
==========================================
  Files         288      283       -5     
  Lines       44088    67041   +22953     
==========================================
+ Hits        28542    42068   +13526     
- Misses      15546    24973    +9427     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 62.74% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

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

Labels

Performance 📈 Issues that are targeted to performance improvements.

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

4 participants