https://github.com/tkf/benchsweeps.jl
https://github.com/tkf/benchsweeps.jl
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkf/benchsweeps.jl
- Owner: tkf
- License: mit
- Created: 2018-12-08T18:08:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-16T03:59:57.000Z (about 6 years ago)
- Last Synced: 2025-05-24T09:38:37.586Z (about 1 year ago)
- Language: Julia
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BenchSweeps
[](https://travis-ci.com/tkf/BenchSweeps.jl)
[](https://codecov.io/gh/tkf/BenchSweeps.jl)
[](https://coveralls.io/github/tkf/BenchSweeps.jl?branch=master)
BenchSweeps.jl wraps [BenchmarkTools.jl] to:
* Setup grid of parameters and define benchmarks for all combinations
of them. Those parameters and defined benchmarks are bundled
together by `BenchSweepGroup`.
* Access benchmark data using dataframe/table-like interface.
`BenchSweepGroup` supports [Tables.jl] and [IterableTables.jl] API
and more controllable interface for [DataFrames.jl].
* Save/load `BenchSweepGroup` to/from a JSON file.
[BenchmarkTools.jl]: https://github.com/JuliaCI/BenchmarkTools.jl
[Tables.jl]: https://github.com/JuliaData/Tables.jl
[IterableTables.jl]: https://github.com/queryverse/IterableTables.jl
[DataFrames.jl]: https://github.com/JuliaData/DataFrames.jl
### Usage:
```julia
using BenchSweeps
using LinearAlgebra
suite = BenchSweepGroup()
suite.axes[:n] = 2 .^ (2:5)
suite.axes[:m] = 2 .^ (2:5)
@defsweep! for (n, m) in suite["matrix-matrix"]
@benchmarkable mul!(Y, A, X) setup=begin
Y = zeros($n, $m)
A = rand($n, $n)
X = rand($n, $m)
end
end
results = run(suite)
using DataFrames
df = DataFrame(results) # now analyze the benchmark
```