-
Notifications
You must be signed in to change notification settings - Fork 487
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
Swagger has enum definitions to generate string enum consts #39
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drub0y
pushed a commit
that referenced
this pull request
May 22, 2018
Provides a more performant implementation of the `SanitizeKey` method for both `AzureTableStorage` and `CosmosDbStorage`. The new implementation is faster in all cases and, perhaps more importantly, the new implementation allocates zero bytes in the case that there are no illegal characters in the key and guarantees only a single allocation in the case when there are bad characters. Benchmarks: ``` ini BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17134 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores [Host] : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3101.0 DefaultJob : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3101.0 ``` | Method | key | Mean | Error | StdDev | Scaled | ScaledSD | Gen 0 | Allocated | |---------------------- |------------------------------------------------------------------------------------------- |------------:|-----------:|-----------:|-------:|---------:|-------:|----------:| | **SanitizeKey_OPTIMIZED** | **bad-key-!@#$%^&*()~/\><,.?';`~** | **379.31 ns** | **8.6554 ns** | **16.2569 ns** | **0.63** | **0.03** | **0.0873** | **368 B** | | SanitizeKey_ORIGINAL | bad-key-!@#$%^&*()~/\><,.?';`~ | 604.43 ns | 11.9625 ns | 11.7487 ns | 1.00 | 0.00 | 0.0887 | 376 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **bad-this-is-a-realllllllll\y-long-key-that- you-probably-wouldn't-encounter//-in-the-wild#** | **1,040.62 ns** | **15.5311 ns** | **14.5278 ns** | **0.56** | **0.01** | **0.2079** | **880 B** | | SanitizeKey_ORIGINAL | bad-this-is-a-realllllllll\y-long-key-that- you-probably-wouldn't-encounter//-in-the-wild# | 1,851.81 ns | 7.5866 ns | 5.4856 ns | 1.00 | 0.00 | 0.1755 | 744 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **good-key-123** | **26.44 ns** | **0.5314 ns** | **0.4437 ns** | **0.11** | **0.00** | **-** | **0 B** | | SanitizeKey_ORIGINAL | good-key-123 | 242.83 ns | 4.9347 ns | 10.5163 ns | 1.00 | 0.00 | 0.0358 | 152 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **good-this-is-a-reallllllllly-long-key-that-you-probably-wouldnt-encounter-in-the-wild#** | **349.20 ns** | **6.5568 ns** | **5.8124 ns** | **0.20** | **0.01** | **0.1101** | **464 B** | | SanitizeKey_ORIGINAL | good-this-is-a-reallllllllly-long-key-that-you-probably-wouldnt-encounter-in-the-wild# | 1,778.14 ns | 37.4411 ns | 72.1362 ns | 1.00 | 0.00 | 0.1659 | 704 B |
tomlm
pushed a commit
that referenced
this pull request
Nov 27, 2018
Provides a more performant implementation of the `SanitizeKey` method for both `AzureTableStorage` and `CosmosDbStorage`. The new implementation is faster in all cases and, perhaps more importantly, the new implementation allocates zero bytes in the case that there are no illegal characters in the key and guarantees only a single allocation in the case when there are bad characters. Benchmarks: ``` ini BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17134 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores [Host] : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3101.0 DefaultJob : .NET Framework 4.7.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3101.0 ``` | Method | key | Mean | Error | StdDev | Scaled | ScaledSD | Gen 0 | Allocated | |---------------------- |------------------------------------------------------------------------------------------- |------------:|-----------:|-----------:|-------:|---------:|-------:|----------:| | **SanitizeKey_OPTIMIZED** | **bad-key-!@#$%^&*()~/\><,.?';`~** | **379.31 ns** | **8.6554 ns** | **16.2569 ns** | **0.63** | **0.03** | **0.0873** | **368 B** | | SanitizeKey_ORIGINAL | bad-key-!@#$%^&*()~/\><,.?';`~ | 604.43 ns | 11.9625 ns | 11.7487 ns | 1.00 | 0.00 | 0.0887 | 376 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **bad-this-is-a-realllllllll\y-long-key-that- you-probably-wouldn't-encounter//-in-the-wild#** | **1,040.62 ns** | **15.5311 ns** | **14.5278 ns** | **0.56** | **0.01** | **0.2079** | **880 B** | | SanitizeKey_ORIGINAL | bad-this-is-a-realllllllll\y-long-key-that- you-probably-wouldn't-encounter//-in-the-wild# | 1,851.81 ns | 7.5866 ns | 5.4856 ns | 1.00 | 0.00 | 0.1755 | 744 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **good-key-123** | **26.44 ns** | **0.5314 ns** | **0.4437 ns** | **0.11** | **0.00** | **-** | **0 B** | | SanitizeKey_ORIGINAL | good-key-123 | 242.83 ns | 4.9347 ns | 10.5163 ns | 1.00 | 0.00 | 0.0358 | 152 B | | | | | | | | | | | | **SanitizeKey_OPTIMIZED** | **good-this-is-a-reallllllllly-long-key-that-you-probably-wouldnt-encounter-in-the-wild#** | **349.20 ns** | **6.5568 ns** | **5.8124 ns** | **0.20** | **0.01** | **0.1101** | **464 B** | | SanitizeKey_ORIGINAL | good-this-is-a-reallllllllly-long-key-that-you-probably-wouldnt-encounter-in-the-wild# | 1,778.14 ns | 37.4411 ns | 72.1362 ns | 1.00 | 0.00 | 0.1659 | 704 B |
ShYuPe
pushed a commit
to ShYuPe/botbuilder-dotnet
that referenced
this pull request
Aug 25, 2020
Update README.md to fix capitalization
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This gets rid of a bunch of hand authored values! 👍