Skip to content

setup BenchmarkCI (mirror of JuliaImages/ImageFiltering.jl#148) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
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
25 changes: 25 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run benchmarks

on:
pull_request:

jobs:
Benchmark:
runs-on: ubuntu-latest
env:
JULIA_DEBUG: BenchmarkCI
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1.3
- name: Install dependencies
run: julia -e 'using Pkg; pkg"add PkgBenchmark BenchmarkCI@0.1"'
- name: Run benchmarks
run: julia -e 'using BenchmarkCI; BenchmarkCI.judge()'
- name: Show
run: julia -e 'using BenchmarkCI; BenchmarkCI.displayjudgement()'
- name: Post results
run: julia -e "using BenchmarkCI; BenchmarkCI.postjudge()"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
*.jl.mem
docs/build
docs/site
Manifest.toml
/Manifest.toml
/.benchmarkci
/benchmark/*.json
1 change: 1 addition & 0 deletions benchmark/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/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"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
17 changes: 16 additions & 1 deletion benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
using ImageFiltering
using PkgBenchmark
using BenchmarkTools
using Statistics: quantile, mean, median!

include("mapwindow.jl")
SUITE = BenchmarkGroup()
SUITE["mapwindow"] = BenchmarkGroup()

let grp = SUITE["mapwindow"]
img1d = randn(1000)
img2d = randn(30,30)
img3d = randn(10,11,12)
grp["cheap f, tiny window"] = @benchmarkable mapwindow(first, $img1d, (1,))
grp["extrema"] = @benchmarkable mapwindow(extrema, $img2d, (5,5))
grp["median!"] = @benchmarkable mapwindow(median!, $img2d, (5,5))
grp["mean, small window"] = @benchmarkable mapwindow(mean, $img1d, (3,))
grp["mean, large window"] = @benchmarkable mapwindow(mean, $img3d, (5,5,5))
grp["expensive f"] = @benchmarkable mapwindow(x -> quantile(vec(x), 0.7), $img3d, (3,3,3))
end
11 changes: 0 additions & 11 deletions benchmark/mapwindow.jl

This file was deleted.