-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filters/auth: reduce allocations for tokeninfo scope and claims checks (
#2794) * filters/auth: reduce allocations for tokeninfo claims check Signed-off-by: Alexander Yastrebov <[email protected]> * filters/auth: add tokeninfo scope check benchmark Signed-off-by: Alexander Yastrebov <[email protected]> * filters/auth: eliminate allocations in tokeninfo scope checks ``` goos: linux goarch: amd64 pkg: github.com/zalando/skipper/filters/auth cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz │ HEAD~1 │ HEAD │ │ sec/op │ sec/op vs base │ OAuthTokeninfoRequest/oauthTokeninfoAllScope-8 422.5n ± 4% 246.2n ± 1% -41.74% (p=0.000 n=10) OAuthTokeninfoRequest/oauthTokeninfoAnyScope-8 413.5n ± 4% 251.5n ± 0% -39.19% (p=0.000 n=10) geomean 418.0n 248.8n -40.48% │ HEAD~1 │ HEAD │ │ B/op │ B/op vs base │ OAuthTokeninfoRequest/oauthTokeninfoAllScope-8 112.0 ± 0% 0.0 ± 0% -100.00% (p=0.000 n=10) OAuthTokeninfoRequest/oauthTokeninfoAnyScope-8 112.0 ± 0% 0.0 ± 0% -100.00% (p=0.000 n=10) geomean 112.0 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean │ HEAD~1 │ HEAD │ │ allocs/op │ allocs/op vs base │ OAuthTokeninfoRequest/oauthTokeninfoAllScope-8 3.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) OAuthTokeninfoRequest/oauthTokeninfoAnyScope-8 3.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) geomean 3.000 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean ``` Signed-off-by: Alexander Yastrebov <[email protected]> --------- Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information
1 parent
b2bb841
commit 0e12f70
Showing
4 changed files
with
129 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
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