-
Notifications
You must be signed in to change notification settings - Fork 432
Need to change the locks #3171
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
Need to change the locks #3171
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
Looking good, @JoshLozensky ...curious if we can add some thread safety tests and have you done any benchmarks on the perf gains when using the specialized type? |
src/Microsoft.IdentityModel.Tokens/Validation/Results/TokenValidationResult.cs
Show resolved
Hide resolved
This comment was marked as duplicate.
This comment was marked as duplicate.
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
Table below shows the percentage change in performance for the given benchmark (negative is "good"). The AggregatePercentageChange is an average of all means from statistically significant tests in the corresponding benchmark. Refer to the formulas below for relevant definitions. It looks like there is a fairly consistent trend of about 3.8% faster validation with the new Lock. Relevant formulas: Difference = TimeNewLock - TimeOldLock StandardError = StandardErrorNewLock + StandardErrorOldLock IsSignificant = Difference > Standard Error PercentageChange = Difference / TimeOldLock
|
I could add some thread-safety tests in a different PR if you'd like but since no logic is changed in this PR I think it is out of scope @jennyf19 |
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.
thanks
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.
Change all plain object locks to System.Thread.Lock objects for .NET 9 or greater.
Addresses issue #3169