-
Notifications
You must be signed in to change notification settings - Fork 98
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
add @benchmarkset & @case for defining benchmark suite #147
Conversation
3f6e4f4
to
312ba6e
Compare
I changed the name to |
Can you rebase onto master to get CI? |
Codecov Report
@@ Coverage Diff @@
## master #147 +/- ##
==========================================
- Coverage 86.37% 86.14% -0.24%
==========================================
Files 6 6
Lines 624 635 +11
==========================================
+ Hits 539 547 +8
- Misses 85 88 +3
Continue to review full report at Codecov.
|
bump just fixed the tests. |
hi @vchuravy mind releasing a patch version for this? |
Just pointing out, this package was intentionally designed to not use macros since they were considered confusing and unclear: |
@KristofferC Ah that makes sense, I didn't know one can use this package with I feel need to polish the documentation a bit for this if we want to revert this PR. I'm OK with both, not sure what other people thinks. |
Well, too late now. |
Is the equivalent using # Root Suite
SUITE = BenchmarkGroup()
# BenchmarkGroup generated by @benchmarkset
s = BenchmarkGroup()
# For loop for each @case
for k in 1:n
s[k] = @benchmarkable rand($k, $k) * rand($k, $k)
end
addgroup!(SUITE, s) |
This PR adds 2 macros to provide a simpler syntax for defining large benchmark suite.
I found it can be a bit annoying if there are multiple benchmark suite like this:
https://github.com/QuantumBFS/YaoArrayRegister.jl/blob/master/benchmark/benchmarks.jl
it is not necessary to manually control things like
SUITE["matrices"]["contiguous"]
, thus I implement these two macro to make defining benchmark suite in a similar syntax as thetestset
inTest
.now you can just write things like
instead of
PS. currently it will generate a constant
SUITE
, which is compatible withPkgBenchmark
Update: I find I need some more modification on this new syntax, the current one still fails to deal with some cases.