-
Notifications
You must be signed in to change notification settings - Fork 351
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
Go Benchmark for OPA filters #2896
Conversation
ca499ae
to
cc45421
Compare
@mjungsbluth do you miss something to add or why it's a draft? |
@szuecs I think this is good as a baseline. Optimizations and adding caching can be done in a sub-sequent PR... |
👍 |
f, err := createOpaFilter(opaControlPlane) | ||
assert.NoError(b, err) | ||
|
||
url, err := url.Parse("http://somehost/somepath") |
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.
It could be skipper.test or opa.test, see https://www.rfc-editor.org/rfc/rfc2606.html#section-3
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.
Good catch. Changed...
@mjungsbluth Could you include benchmark results into commit message please? |
Looks good to me, however, I agree with all small suggestions left by other folks here. |
👍 |
cc45421
to
0cda93d
Compare
@AlexanderYastrebov yes, added those to the commit message... |
👍 |
@mjungsbluth there is a conflict |
Baseline on a Macbook Air M1: BenchmarkAuthorizeRequest/authorize-request-minimal-8 45476 22514 ns/op 20789 B/op 388 allocs/op BenchmarkAuthorizeRequest/authorize-request-jwt-validation-8 5868 195705 ns/op 55493 B/op 864 allocs/op Signed-off-by: Magnus Jungsbluth <[email protected]>
0cda93d
to
92e32a9
Compare
👍 |
1 similar comment
👍 |
This PR adds basic benchmarks for the OPA filters
Baseline results on a MacBook Air M1
BenchmarkAuthorizeRequest/authorize-request-minimal-8 45476 22514 ns/op 20789 B/op 388 allocs/op
BenchmarkAuthorizeRequest/authorize-request-jwt-validation-8 5868 195705 ns/op 55493 B/op 864 allocs/op