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

Performance: Adds use of ValueStopwatch instead of Stopwatch #3320

Merged
merged 7 commits into from
Jul 5, 2022

Conversation

imanvt
Copy link
Contributor

@imanvt imanvt commented Jun 30, 2022

Pull Request Template

Description

This PR is for a performance improvement to use a new ValueStopwatch type instead of the Stopwatch type, which reduces allocations.

Micro Benchmark Test Results:

Method Mean Error StdDev Gen 0 Allocated
StopwatchAllocation 3.8487 ns 0.1114 ns 0.2876 ns 0.0093 40 B
ValueStopwatchAllocation 0.1195 ns 0.0400 ns 0.1180 ns - -
StopwatchAsField 8.4661 ns 0.1948 ns 0.2600 ns 0.0148 64 B
ValueStopwatchBoxedAsField 1.8442 ns 0.0438 ns 0.1272 ns - -

Type of change

  • New feature (non-breaking change which adds functionality)

Closing issues

Part 2 of 2, closes #3274

@imanvt imanvt marked this pull request as ready for review July 5, 2022 13:52
@imanvt
Copy link
Contributor Author

imanvt commented Jul 5, 2022

due to an internal implementation detail with the ValueStopwatch, there is a concern that will cause some issues with diagnostics for the SDK. Closing the PR, may reopen if this implementation detail gets fixed.

@imanvt imanvt closed this Jul 5, 2022
@imanvt imanvt reopened this Jul 5, 2022
@imanvt imanvt marked this pull request as draft July 5, 2022 17:36
@imanvt imanvt marked this pull request as ready for review July 5, 2022 19:08
@imanvt
Copy link
Contributor Author

imanvt commented Jul 5, 2022

issues were caused by the stopwatch being readonly, fixed and reopening PR. Ready for review

@imanvt imanvt requested a review from j82w July 5, 2022 19:16
@j82w j82w merged commit 71f39dd into master Jul 5, 2022
@j82w j82w deleted the users/imanvt/3274-valuestopwatch-perf branch July 5, 2022 20:00
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.

Port Auth improvements from msdata repo
3 participants