diff --git a/Project.toml b/Project.toml index 413e628..1df8002 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PkgJogger" uuid = "10150987-6cc1-4b76-abee-b1c1cbd91c01" authors = ["Alexius Wadell and contributors"] -version = "0.4.2" +version = "0.5.0" [deps] BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" @@ -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" diff --git a/action.yml b/action.yml index c2ea3db..76c70b0 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/docs/make.jl b/docs/make.jl index 9675630..127f3e1 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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")) diff --git a/docs/src/jogger.md b/docs/src/jogger.md index 5d08314..9d16987 100644 --- a/docs/src/jogger.md +++ b/docs/src/jogger.md @@ -92,7 +92,6 @@ Example`. ```@docs JogExample.suite JogExample.benchmark -JogExample.warmup JogExample.run JogExample.save_benchmarks JogExample.load_benchmarks diff --git a/src/jogger.jl b/src/jogger.jl index 5fafc51..19c5fdb 100644 --- a/src/jogger.jl +++ b/src/jogger.jl @@ -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 @@ -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 @@ -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 diff --git a/src/utils.jl b/src/utils.jl index 76aa799..0695499 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -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 diff --git a/test/smoke_tests.jl b/test/smoke_tests.jl index b1d4272..d3e084d 100644 --- a/test/smoke_tests.jl +++ b/test/smoke_tests.jl @@ -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