Skip to content

Commit

Permalink
Merge pull request #71 from awadell1/warmup
Browse files Browse the repository at this point in the history
Remove Warmup
  • Loading branch information
awadell1 authored Feb 28, 2024
2 parents 22ccb6b + 44d5d10 commit 6c8daf5
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PkgJogger"
uuid = "10150987-6cc1-4b76-abee-b1c1cbd91c01"
authors = ["Alexius Wadell <[email protected]> and contributors"]
version = "0.4.2"
version = "0.5.0"

[deps]
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
Expand All @@ -17,7 +17,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
BSON = "0.3"
BenchmarkTools = "1"
BenchmarkTools = "1.5"
CodecZlib = "0.7"
JSON = "0.21"
Pkg = "1.9"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
id: install_pkgjogger
run: >
julia --color=yes --eval
'using Pkg; Pkg.develop(PackageSpec(; name="PkgJogger", path="${{ github.action_path }}"))'
'using Pkg; Pkg.Registry.update(); Pkg.develop(PackageSpec(; name="PkgJogger", path="${{ github.action_path }}"))'
shell: bash

- name: ⏱ Run Benchmarks
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Setup the Documenter environment
using Pkg
Pkg.activate(@__DIR__)
Pkg.Registry.update()
Pkg.develop([
PackageSpec(path=joinpath(@__DIR__, "..")),
PackageSpec(path=joinpath(@__DIR__, "..", "test", "Example.jl"))
Expand Down
1 change: 0 additions & 1 deletion docs/src/jogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ Example`.
```@docs
JogExample.suite
JogExample.benchmark
JogExample.warmup
JogExample.run
JogExample.save_benchmarks
JogExample.load_benchmarks
Expand Down
11 changes: 0 additions & 11 deletions src/jogger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ not, re-run `@jog PkgName` to fully reload `JogPkgName`.
- `suite` Return a `BenchmarkGroup` of the benchmarks for `PkgName`
- `benchmark` Warmup, tune and run the suite
- `run` Dispatch to `BenchmarkTools.run(suite(), args...; kwargs...)`
- `warmup` Dispatch to `BenchmarkTools.warmup(suite(), args...; kwargs...)`
- `save_benchmarks` Save benchmarks for `PkgName` using an unique filename
## Isolated Benchmarks
Expand Down Expand Up @@ -113,7 +112,6 @@ macro jog(pkg)
"""
function benchmark(; verbose = false, save = false, ref = nothing)
s = suite()
BenchmarkTools.warmup(s; verbose)
__tune!(s, ref; verbose = verbose)
results = BenchmarkTools.run(s; verbose = verbose)
if save
Expand All @@ -134,15 +132,6 @@ macro jog(pkg)
BenchmarkTools.run(suite(), args...; verbose = verbose, kwargs...)
end

"""
warmup(; verbose::Bool = false)
Warmup the benchmarking suite for $($pkg)
"""
function warmup(; verbose = false)
BenchmarkTools.warmup(suite(); verbose)
end

"""
save_benchmarks(results::BenchmarkGroup)::String
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function test_benchmarks(name, s::BenchmarkTools.BenchmarkGroup)
end
function test_benchmarks(name, b::BenchmarkTools.Benchmark)
@testset "$name" begin
run(b; verbose=false, samples=1, evals=1, gctrial=false, gcsample=false)
b.samplefunc(b.quote_vals, BenchmarkTools.Parameters(b.params; evals=1))
@test true
end
end
Expand Down
3 changes: 0 additions & 3 deletions test/smoke_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
r = JogExample.benchmark()
@test typeof(r) <: BenchmarkTools.BenchmarkGroup

# Warmup
@test_nowarn JogExample.warmup()

# Running
r = JogExample.run()
@test typeof(r) <: BenchmarkTools.BenchmarkGroup
Expand Down

2 comments on commit 6c8daf5

@awadell1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/101939

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" 6c8daf5e0c4a1979a87d2fce081838685215d587
git push origin v0.5.0

Please sign in to comment.