Skip to content

Add BenchmarkDotNet performance benchmarks using Dapr.Testcontainers#1793

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/add-dotnet-benchmarking-project
Draft

Add BenchmarkDotNet performance benchmarks using Dapr.Testcontainers#1793
Copilot wants to merge 4 commits intomasterfrom
copilot/add-dotnet-benchmarking-project

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

Description

Adds a Dapr.Benchmarks project that uses BenchmarkDotNet with Dapr.Testcontainers to benchmark SDK operations against a real Dapr sidecar — no gRPC mocking required. Includes a separate non-blocking GitHub Actions workflow for informational tracking.

Benchmark project (test/Dapr.Benchmarks/)

  • StateStoreBenchmarks — Save/Get/Delete with Small/Medium/Large payloads against Redis state store
  • PubSubBenchmarks — Publish and end-to-end Publish+Receive via RabbitMQ
  • WorkflowBenchmarks — Simple single-activity and fan-out (5 parallel activities) workflow execution
  • DaprBenchmarkBase — Shared infrastructure managing DaprTestEnvironment lifecycle for [GlobalSetup]/[GlobalCleanup]
  • All benchmarks use [MemoryDiagnoser] for allocation tracking

CI workflow (.github/workflows/benchmarks.yml)

  • Triggers: master push, weekly schedule, workflow_dispatch
  • Matrix: net8.0, net9.0, net10.0
  • Uploads BenchmarkResults/ as artifacts (90-day retention)
  • Not a release blocker — fully decoupled from sdk_build.yml

The project is IsPackable=false and the name Dapr.Benchmarks intentionally does not match the Dapr.*.Test.csproj / Dapr.IntegrationTest.*.csproj CI test discovery globs, so it won't be picked up by existing test jobs.

# Run all benchmarks
dotnet run -c Release --project test/Dapr.Benchmarks -- --filter '*'

# Single category on a specific TFM
dotnet run -c Release -f net10.0 --project test/Dapr.Benchmarks -- --filter '*StateStore*'

Issue reference

Informational benchmarking infrastructure — no prior issue.

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Copilot AI and others added 2 commits April 16, 2026 10:16
Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/31166ce7-5f84-4e35-af61-145e4584855b

Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
@WhitWaldo
Copy link
Copy Markdown
Contributor

@copilot Can you please resolve the merge conflict?

…benchmarking-project

# Conflicts:
#	all.sln

Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot Can you please resolve the merge conflict?

Resolved in de024a3. The conflict was in all.sln where both this branch and master (#1789 WorkflowRetryPolicy example) added project entries at the same location. Both entries are now included.

Copilot AI requested a review from WhitWaldo April 16, 2026 11:05
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.37%. Comparing base (a5f2008) to head (aa8f98c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1793   +/-   ##
=======================================
  Coverage   62.37%   62.37%           
=======================================
  Files         285      285           
  Lines        8421     8421           
  Branches      980      980           
=======================================
  Hits         5253     5253           
  Misses       2935     2935           
  Partials      233      233           
Flag Coverage Δ
net10.0 62.36% <ø> (ø)

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.

@WhitWaldo
Copy link
Copy Markdown
Contributor

@copilot Can you please resolve the git merge conflicts?

…benchmarking-project

# Conflicts:
#	all.sln

Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot Can you please resolve the git merge conflicts?

Resolved in aa8f98c. The conflict was in all.sln where master added Dapr.IntegrationTest.Examples (#1792) and Dapr.IntegrationTest.Actors.Generators (#1791) at the same location as our Dapr.Benchmarks entry. All three project entries are now included.

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.

2 participants