Skip to content

Commit

Permalink
[ci skip] Minimal benchmark setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Feb 18, 2020
1 parent e48d2f0 commit 26da068
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
*.jl.*.cov
*.jl.mem
/Manifest.toml
/benchmark/Manifest.toml
/docs/Manifest.toml
4 changes: 4 additions & 0 deletions benchmark/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
18 changes: 18 additions & 0 deletions benchmark/bench_qr.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module BenchQR

using BenchmarkTools
using LinearAlgebra
using StaticArrays

suite = BenchmarkGroup()

for K = 1:22
a = rand(SMatrix{K,K,Float64,K*K})
m = Matrix(a)
s = suite["S=$K"]
s["SMatrix"] = @benchmarkable qr($a)
s["Matrix"] = @benchmarkable qr($m)
end

end # module
BenchQR.suite
8 changes: 8 additions & 0 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using BenchmarkTools
SUITE = BenchmarkGroup()
for file in sort(readdir(@__DIR__))
if startswith(file, "bench_") && endswith(file, ".jl")
SUITE[file[length("bench_") + 1:end - length(".jl")]] =
include(file)
end
end

0 comments on commit 26da068

Please sign in to comment.