Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ Run a single evaluation of `x`. This can be useful if you think JIT overhead is

# Macros

##### `@benchmarkable(expr; kwargs...)`
##### `@benchmarkable(expr, kwargs...)`

Define and return, but do not tune or run, a `Benchmark` that can be used to test the performance of `expr`. Relevant manual documentation can be found [here](manual.md#benchmarking-basics) (for valid `kwargs` values, see [here](manual.md#benchmark-parameters) specifically). If used in local scope, all
external local variables must be interpolated.

##### `@benchmark(expr; kwargs...)`
##### `@benchmark(expr, kwargs...)`

Define, tune, and run the `Benchmark` generated from `expr`. Relevant manual documentation can be found [here](manual.md#benchmarking-basics) (for valid `kwargs` values, see [here](manual.md#benchmark-parameters) specifically). If used in local scope, all external local variables must be interpolated.

Expand Down
8 changes: 1 addition & 7 deletions test/ExecutionTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sizes = (5, 10, 20)
for s in sizes
A = rand(s, s)
groups["sum"][s] = @benchmarkable sum($A) seconds=3
groups["sin"][s] = @benchmarkable(sin($s); seconds=1, gctrial=false)
groups["sin"][s] = @benchmarkable(sin($s), seconds=1, gctrial=false)
end

groups["special"]["macro"] = @benchmarkable @test(1 == 1)
Expand Down Expand Up @@ -135,12 +135,6 @@ tune!(b)
# test kwargs separated by `,`
@benchmark(output=sin(x), setup=(x=1.0; output=0.0), teardown=(@test output == sin(x)))

# test kwargs separated by `;`
@benchmark(output=sin(x); setup=(x=1.0; output=0.0), teardown=(@test output == sin(x)))

# test kwargs separated by `,` and `;`
@benchmark(output=sin(x), setup=(x=1.0; output=0.0); teardown=(@test output == sin(x)))

########
# misc #
########
Expand Down