Skip to content

Commit

Permalink
Fixes some plots output and provide basic scripts for those
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzaare committed May 28, 2024
1 parent b10b057 commit b325aab
Show file tree
Hide file tree
Showing 47 changed files with 10,086 additions and 9,194 deletions.
4 changes: 4 additions & 0 deletions ext/MakieExt/allocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ function PerfChecker.table_to_pie(x::Table, ::Val{:alloc}; pkg_name = "")
end

function PerfChecker.checkres_to_pie(x::PerfChecker.CheckerResult, ::Val{:alloc})
name(i) = x.pkgs[i].name * "_v" * string(x.pkgs[i].version)
return map(
i -> (name(i) => table_to_pie(x.tables[i], Val(:alloc), pkg_name = name(i))),
eachindex(x.tables))
end

function PerfChecker.checkres_to_scatterlines(
Expand Down
1 change: 1 addition & 0 deletions perf/GLM/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
PerfChecker = "6309bf6b-a531-4b08-891e-8ee981e5c424"
Expand Down
12 changes: 11 additions & 1 deletion perf/GLM/bench.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PerfChecker, BenchmarkTools
using PerfChecker, BenchmarkTools, CairoMakie

d = Dict(:targets => ["GLM"],
:path => @__DIR__, :evals => 1, :samples => 100, :seconds => 100,
Expand Down Expand Up @@ -33,3 +33,13 @@ end begin
end

@info x

mkpath(joinpath(@__DIR__, "visuals"))

c = checkres_to_scatterlines(x, Val(:benchmark))
save(joinpath(@__DIR__, "visuals", "bench_evolution.png"), c)

for kwarg in [:times, :gctimes, :memory, :allocs]
c2 = checkres_to_boxplots(x, Val(:benchmark); kwarg)
save(joinpath(@__DIR__, "visuals", "bench_boxplots_$kwarg.png"), c2)
end
12 changes: 11 additions & 1 deletion perf/GLM/chair.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PerfChecker, Chairmarks
using PerfChecker, Chairmarks, CairoMakie

d = Dict(:targets => ["GLM"],
:path => @__DIR__, :evals => 1, :samples => 100, :seconds => 100,
Expand Down Expand Up @@ -33,3 +33,13 @@ end begin
end

@info x

mkpath(joinpath(@__DIR__, "visuals"))

c = checkres_to_scatterlines(x, Val(:chairmark))
save(joinpath(@__DIR__, "visuals", "chair_evolution.png"), c)

for kwarg in [:times, :gctimes, :bytes, :allocs]
c2 = checkres_to_boxplots(x, Val(:chairmark); kwarg)
save(joinpath(@__DIR__, "visuals", "chair_boxplots_$kwarg.png"), c2)
end
Binary file added perf/GLM/visuals/bench_boxplots_allocs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/bench_boxplots_gctimes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/bench_boxplots_memory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/bench_boxplots_times.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/bench_evolution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/chair_boxplots_allocs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/chair_boxplots_bytes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/chair_boxplots_gctimes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/chair_boxplots_times.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added perf/GLM/visuals/chair_evolution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion perf/PatternFolds/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
Expand Down
14 changes: 12 additions & 2 deletions perf/PatternFolds/allocs.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using PerfChecker, CairoMakie, CSV
using PerfChecker, CairoMakie

d = Dict(:targets => ["PatternFolds"], :path => @__DIR__, :tags => [:patterns, :intervals],
:pkgs => ("PatternFolds", :custom, [v"0.2.2", v"0.2.3", v"0.2.4"], true))
:pkgs => (
"PatternFolds", :custom, [v"0.2.0", v"0.2.1", v"0.2.2", v"0.2.3", v"0.2.4"], true))

x = @check :alloc d begin
using PatternFolds
Expand All @@ -24,3 +25,12 @@ end begin
end

@info x

mkpath(joinpath(@__DIR__, "visuals"))

c = checkres_to_scatterlines(x, Val(:alloc))
save(joinpath(@__DIR__, "visuals", "allocs_evolution.png"), c)

for (name, c2) in checkres_to_pie(x, Val(:alloc))
save(joinpath(@__DIR__, "visuals", "allocs_pie_$name.png"), c2)
end
21 changes: 16 additions & 5 deletions perf/PatternFolds/bench.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using PerfChecker, BenchmarkTools
using PerfChecker, BenchmarkTools, CairoMakie

d = Dict(:path => @__DIR__, :evals => 1, :samples => 100,
d = Dict(:path => @__DIR__, :evals => 10, :samples => 1000,
:seconds => 100, :tags => [:patterns, :intervals],
:pkgs => ("PatternFolds", :custom, [v"0.2.2", v"0.2.3", v"0.2.4"], true),
:pkgs => (
"PatternFolds", :custom, [v"0.2.0", v"0.2.1", v"0.2.2", v"0.2.3", v"0.2.4"], true),
:devops => "PatternFolds")

t = @check :benchmark d begin
x = @check :benchmark d begin
using PatternFolds
end begin
# Intervals
Expand All @@ -28,4 +29,14 @@ end begin
return nothing
end

@info t
@info x

mkpath(joinpath(@__DIR__, "visuals"))

c = checkres_to_scatterlines(x, Val(:benchmark))
save(joinpath(@__DIR__, "visuals", "bench_evolution.png"), c)

for kwarg in [:times, :gctimes, :memory, :allocs]
c2 = checkres_to_boxplots(x, Val(:benchmark); kwarg)
save(joinpath(@__DIR__, "visuals", "bench_boxplots_$kwarg.png"), c2)
end
22 changes: 17 additions & 5 deletions perf/PatternFolds/chair.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using PerfChecker, Chairmarks
using PerfChecker, Chairmarks, CairoMakie

d = Dict(:path => @__DIR__, :evals => 1, :tags => [:patterns, :intervals],
:pkgs => ("PatternFolds", :custom, [v"0.2.2", v"0.2.3", v"0.2.4"], true),
d = Dict(:path => @__DIR__, :evals => 10, :samples => 1000,
:seconds => 100, :tags => [:patterns, :intervals],
:pkgs => (
"PatternFolds", :custom, [v"0.2.0", v"0.2.1", v"0.2.2", v"0.2.3", v"0.2.4"], true),
:devops => "PatternFolds")

t = @check :chairmark d begin
x = @check :chairmark d begin
using PatternFolds
end begin
# Intervals
Expand All @@ -27,4 +29,14 @@ end begin
return nothing
end

@info t
@info x

mkpath(joinpath(@__DIR__, "visuals"))

c = checkres_to_scatterlines(x, Val(:chairmark))
save(joinpath(@__DIR__, "visuals", "chair_evolution.png"), c)

for kwarg in [:times, :gctimes, :bytes, :allocs]
c2 = checkres_to_boxplots(x, Val(:chairmark); kwarg)
save(joinpath(@__DIR__, "visuals", "chair_boxplots_$kwarg.png"), c2)
end
18 changes: 12 additions & 6 deletions perf/PatternFolds/metadata/metadata.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
benchmark_PatternFolds_v0.2.2_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.3_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.4_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.2_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.3_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.4_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
alloc_PatternFolds_v0.2.2_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
alloc_PatternFolds_v0.2.3_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
alloc_PatternFolds_v0.2.4_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
alloc_PatternFolds_v0.2.0_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
alloc_PatternFolds_v0.2.1_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.0_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.1_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.2_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.3_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
chairmark_PatternFolds_v0.2.4_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.0_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.1_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.2_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.3_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
benchmark_PatternFolds_v0.2.4_patterns_intervals,36c9068f-2e67-410b-b8bb-d57c1b476f62
Loading

0 comments on commit b325aab

Please sign in to comment.