Skip to content

Commit d74c567

Browse files
authored
Merge pull request #211 from Roger-luo/fix-benchmarkset
add docstrings for benchmarkset
2 parents 863c514 + 484f8ea commit d74c567

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/groups.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,28 @@ end
305305

306306
const benchmark_stack = []
307307

308+
"""
309+
@benchmarkset "title" begin ... end
310+
311+
Create a benchmark set, or multiple benchmark sets if a `for` loop is provided.
312+
313+
# Examples
314+
315+
```julia
316+
@benchmarkset "suite" for k in 1:5
317+
@case "case \$k" rand(\$k, \$k)
318+
end
319+
```
320+
"""
308321
macro benchmarkset(title, ex)
309322
esc(benchmarkset_m(title, ex))
310323
end
311324

325+
"""
326+
@case title <expr to benchmark> [setup=<setup expr>]
327+
328+
Mark an expression as a benchmark case. Must be used inside [`@benchmarkset`](@ref).
329+
"""
312330
macro case(title, xs...)
313331
esc(:($(Symbol("#suite#"))[$title] = @benchmarkable $(xs...)))
314332
end

0 commit comments

Comments
 (0)