Skip to content

Commit

Permalink
Merge pull request #386 from willow-ahrens/wma/deprecate-benchmarkset…
Browse files Browse the repository at this point in the history
…-macro

deprecate @benchmarkset
  • Loading branch information
willow-ahrens authored Jan 6, 2025
2 parents 5b76b55 + 510d1b4 commit 3c28dca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ const benchmark_stack = []
Create a benchmark set, or multiple benchmark sets if a `for` loop is provided.
!!! danger "`@benchmarkset` is deprecated."
Instead, add to `group = BenchmarkGroup()` using `group[key] = @benchmark...`
# Examples
```julia
Expand All @@ -383,13 +386,20 @@ end
```
"""
macro benchmarkset(title, ex)
Base.depwarn(
"`BenchmarkTools.@benchmarkset` is deprecated. Instead, add to `group = BenchmarkGroup()` using `group[key] = @benchmark...`",
:benchmarkset,
)
return esc(benchmarkset_m(title, ex))
end

"""
@case title <expr to benchmark> [setup=<setup expr>]
Mark an expression as a benchmark case. Must be used inside [`@benchmarkset`](@ref).
!!! danger "`@benchmarkset` is deprecated."
Instead, add to `group = BenchmarkGroup()` using `group[key] = @benchmark...`
"""
macro case(title, xs...)
return esc(:($(Symbol("#suite#"))[$title] = @benchmarkable $(xs...)))
Expand Down

0 comments on commit 3c28dca

Please sign in to comment.