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: use TryGetSingle instead of collection enumerable to lists. #1738

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

TimothyMakkison
Copy link
Contributor

  • Added TryGetSingle to get the first value of an enumerable and determine the size.
  • Replaced ToList with TryGetSingle where possible
  • Converted parameterList to parameterArray
  • Fixed a typo in Benchmarks.Program

Overall saved 1.5KB on startup

Original

Method Job InvocationCount UnrollFactor Mean Error StdDev Median Gen0 Gen1 Allocated
CreateService DefaultJob Default 16 50.549 us 0.4770 us 1.1055 us 50.153 us 5.2490 0.1221 48.44 KB
ConstantRouteAsync DefaultJob Default 16 56.332 us 1.0927 us 1.3008 us 55.841 us 6.1035 0.2441 57.09 KB
ComplexRequestAsync DefaultJob Default 16 59.373 us 0.3266 us 0.3055 us 59.287 us 6.3477 0.2441 59.05 KB

Changes

Method Job InvocationCount UnrollFactor Mean Error StdDev Median Gen0 Gen1 Allocated
CreateService DefaultJob Default 16 48.218 us 0.5801 us 0.4844 us 48.305 us 5.0659 0.1831 46.9 KB
ConstantRouteAsync DefaultJob Default 16 53.603 us 0.9289 us 0.8689 us 53.636 us 5.9814 0.1221 55.55 KB
ComplexRequestAsync DefaultJob Default 16 55.295 us 0.4157 us 0.3888 us 55.167 us 6.2256 0.2441 57.5 KB

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 89.55224% with 7 lines in your changes missing coverage. Please review.

Project coverage is 84.74%. Comparing base (6ebeda5) to head (94a72b4).
Report is 45 commits behind head on main.

Current head 94a72b4 differs from pull request most recent head 4f86827

Please upload reports for the commit 4f86827 to get more accurate results.

Files Patch % Lines
Refit/RestMethodInfo.cs 87.50% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1738      +/-   ##
==========================================
- Coverage   87.73%   84.74%   -2.99%     
==========================================
  Files          33       36       +3     
  Lines        2348     2491     +143     
  Branches      294      319      +25     
==========================================
+ Hits         2060     2111      +51     
- Misses        208      300      +92     
  Partials       80       80              

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

@ChrisPulman ChrisPulman enabled auto-merge (squash) June 25, 2024 18:36
@ChrisPulman ChrisPulman merged commit 03d7bbc into reactiveui:main Jun 25, 2024
1 check passed
Copy link

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