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 1
1
using PkgBenchmark
2
2
using BenchmarkTools
3
+ using Statistics
3
4
using Test
4
5
using Dates
5
6
using LibGit2
@@ -73,6 +74,21 @@ temp_pkg_dir(;tmp_dir = tmp_dir) do
73
74
end
74
75
end
75
76
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" ] = maximum (r[" foo" ]); return r))) == BenchmarkResults
89
+ end
90
+ end
91
+
76
92
# Make a commit with a small benchmarks.jl file
77
93
testpkg_path = Pkg. dir (TEST_PACKAGE_NAME)
78
94
LibGit2. init (testpkg_path)
You can’t perform that action at this time.
0 commit comments