Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <alexander.yastrebov@zalando.de>
- Loading branch information