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 |
Change all plain object locks to System.Thread.Lock objects for .NET 9 or greater.
Addresses issue #3169