-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
tests: adds mage target for CRS benchmarks. #1003
Conversation
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.
lgtm
@@ -53,7 +53,7 @@ func BenchmarkCRSCompilation(b *testing.B) { | |||
} | |||
} | |||
|
|||
func BenchmarkCRSSimpleGET(b *testing.B) { | |||
func BenchmarkCRSRuntimeSimpleGET(b *testing.B) { |
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.
I'm not too clear on what Runtime means here. If it means running time of the operation, I think all benchmarks measure that so doesn't need to be in name
|
||
func CRSBenchmark() error { | ||
bench := "BenchmarkCRSRuntime(Simple|Large)(GET|POST)" | ||
err := sh.RunV("go", "test", "-run=^$,", "-benchmem", "-bench=^"+bench+"$", "./testing/coreruleset", "-cpuprofile=cpuprof.out") |
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.
This may be ambiguous; what about running the benchmark for results and adding a parameter to create a CPU profile?
@jcchavezs Care to take a look at comments, or just merge? |
@jcchavezs Ping. |
Ease benchmark running