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

feat: add startup and performance benchmarks #1731

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

TimothyMakkison
Copy link
Contributor

  • Used file scoped namespaces and simplified Program.cs
  • Added PerformanceBenchmark to measure the speed to create and make the average request.
  • StartupBenchmark measures Refit api creation and call time.
    • Measures: Service creation time, service creation and first call, just first call.
    • Not sure if its worth having the first call benchmarks as they have contradictory results. Why does FirstCallComplexRequestAsync use less memory than repeated calls? I might be missing something.

Performance

Method Mean Error StdDev Gen0 Gen1 Allocated
ConstantRouteAsync 2.940 us 0.0587 us 0.0897 us 0.7744 0.0038 7.13 KB
DynamicRouteAsync 3.569 us 0.0696 us 0.0905 us 0.8163 - 7.52 KB
ComplexDynamicRouteAsync 5.022 us 0.0953 us 0.1539 us 0.9003 0.0076 8.34 KB
ObjectRequestAsync 5.556 us 0.0978 us 0.0817 us 1.0071 - 9.28 KB
ComplexRequestAsync 14.040 us 0.2503 us 0.2090 us 1.7090 - 15.86 KB

Startup

Method Job InvocationCount UnrollFactor Mean Error StdDev Median Gen0 Gen1 Allocated
CreateService DefaultJob Default 16 49.34 us 0.980 us 2.733 us 48.27 us 5.2490 0.1831 48.44 KB
ConstantRouteAsync DefaultJob Default 16 52.29 us 1.023 us 1.050 us 52.36 us 6.1035 0.2441 57.16 KB
ComplexRequestAsync DefaultJob Default 16 56.78 us 1.103 us 1.354 us 56.49 us 6.3477 0.2441 59.34 KB
FirstCallConstantRouteAsync Job-SUVBDY 1 1 43.62 us 1.434 us 4.091 us 42.05 us - - 9.87 KB
FirstCallComplexRequestAsync Job-SUVBDY 1 1 63.88 us 1.262 us 1.640 us 63.40 us - - 13.07 KB

Copy link

codecov bot commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.68%. Comparing base (6ebeda5) to head (a17f0b4).
Report is 40 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1731      +/-   ##
==========================================
- Coverage   87.73%   87.68%   -0.05%     
==========================================
  Files          33       34       +1     
  Lines        2348     2355       +7     
  Branches      294      296       +2     
==========================================
+ Hits         2060     2065       +5     
- Misses        208      212       +4     
+ Partials       80       78       -2     

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

@ChrisPulman ChrisPulman merged commit 8a40692 into reactiveui:main Jun 24, 2024
2 of 3 checks passed
@TimothyMakkison TimothyMakkison deleted the benchmarks branch June 24, 2024 18:52
Copy link

github-actions bot commented Jul 9, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants