-
Notifications
You must be signed in to change notification settings - Fork 340
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
Conversation
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 |
@microsoft-github-policy-service agree |
@neha-bhargava - please review this PR. There may be implications in how we interpret some of our telemetry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
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