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

MeasureDurationResult incorrect when running in linux #4785

Merged
merged 5 commits into from
May 30, 2024

Conversation

SingleCopy
Copy link
Contributor

Fixes: #4784

Changes proposed in this request
The MeasureDurationResult time calculations do not work when running in linux as the Stopwatch.Frequency is not taken into account. This change correctly calculates the Milliseconds and Microseconds by taking the Stopwatch.Frequency into account.

Testing
Difficult without running the tests on different O/S

Performance impact
N/A

Documentation
N/A

@SingleCopy SingleCopy requested a review from a team as a code owner May 23, 2024 15:14
@bgavrilMS
Copy link
Member

This is a very good catch @SingleCopy . I found some mention about this here: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch.elapsedticks?view=net-8.0&redirectedfrom=MSDN#System_Diagnostics_Stopwatch_ElapsedTicks

@GeoK - I think this code is common with our other SDKs

@bgavrilMS bgavrilMS requested a review from GeoK May 23, 2024 15:24
@bgavrilMS bgavrilMS requested a review from pmaytak May 25, 2024 08:02
@bgavrilMS
Copy link
Member

CC @jennyf19 as I believe this code was copied from MISE. Also adding @pmaytak for a review

@SingleCopy
Copy link
Contributor Author

@microsoft-github-policy-service agree

@bgavrilMS
Copy link
Member

@neha-bhargava - please review this PR. There may be implications in how we interpret some of our telemetry.

Copy link
Contributor

@neha-bhargava neha-bhargava left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@bgavrilMS bgavrilMS merged commit 239d9d6 into AzureAD:main May 30, 2024
1 check passed
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.

[Bug] MeasureDurationResult incorrect when running in linux
5 participants