-
Notifications
You must be signed in to change notification settings - Fork 36
Add benchmark GHA #79
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
24e1ca4
benchmark CI
palday cd3d5d6
fix
palday f237e01
tie benchmark
palday 5a6f1e0
tweak
palday 88a2181
nope
palday b48b744
Apply suggestions from code review
palday d2d4a9f
name
palday 33e5981
Merge branch 'pa/benchmark' of github.com:JuliaStats/Loess.jl into pa…
palday File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: benchmarks | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
paths-ignore: | ||
- 'LICENSE.md' | ||
- 'README.md' | ||
- 'docs/**' | ||
- 'format/**' | ||
- 'test/**' | ||
jobs: | ||
benchmarks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- uses: julia-actions/cache@v1 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- name: Benchmark | ||
run: | | ||
git fetch origin +:refs/remotes/origin/HEAD | ||
julia --project=benchmark/ -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate()' | ||
# Pkg.update() allows us to benchmark even when dependencies/compat requirements change | ||
julia --project=benchmark/ -e ' | ||
using PkgBenchmark, Loess | ||
juliacmd = `$(Base.julia_cmd()) -O3 -e "using Pkg; Pkg.update()"` | ||
config = BenchmarkConfig(; id="origin/HEAD", juliacmd) | ||
export_markdown(stdout, judge(Loess, config; verbose=true))' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
Loess = "4345ca2d-374a-55d4-8d30-97f9976e7612" | ||
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
|
||
[compat] | ||
BenchmarkTools = "1" | ||
PkgBenchmark = "0.2" | ||
julia = "1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using BenchmarkTools, Loess, Random | ||
|
||
const SUITE = BenchmarkGroup() | ||
|
||
SUITE["random"] = BenchmarkGroup() | ||
|
||
for i in 2:6 | ||
n = 10^i | ||
x = rand(MersenneTwister(42), n) | ||
y = sqrt.(x) | ||
SUITE["random"][string(n)] = @benchmarkable loess($x, $y) | ||
end | ||
|
||
SUITE["ties"] = BenchmarkGroup() | ||
let | ||
x = repeat([π/4*i for i in -20:20], inner=101) | ||
y = sin.(x) | ||
SUITE["ties"]["sine"] = @benchmarkable loess($x, $y; span=0.2) | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth using StableRNGs here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it and probably not -- we don't care about the precise values and this is always run within the same Julia version for each new PR