File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11using PkgBenchmark
22using BenchmarkTools
3+ using Statistics
34using Test
45using Dates
56using LibGit2
@@ -73,6 +74,21 @@ temp_pkg_dir(;tmp_dir = tmp_dir) do
7374 end
7475 end
7576
77+ @testset " postprocess" begin
78+ PkgBenchmark. _withtemp (tempname ()) do f
79+ str = """
80+ using BenchmarkTools
81+ SUITE = BenchmarkGroup()
82+ SUITE["foo"] = @benchmarkable for _ in 1:100; 1+1; end
83+ """
84+ open (f, " w" ) do file
85+ print (file, str)
86+ end
87+ @test typeof (benchmarkpkg (TEST_PACKAGE_NAME, script= f;
88+ postprocess= (r)-> (r[" foo" ] = median (r[" foo" ])/ 100 ; return r))) == BenchmarkResults
89+ end
90+ end
91+
7692 # Make a commit with a small benchmarks.jl file
7793 testpkg_path = Pkg. dir (TEST_PACKAGE_NAME)
7894 LibGit2. init (testpkg_path)
You can’t perform that action at this time.
0 commit comments