Skip to content

Add some utilities to produce and write output to files #66

@Azzaare

Description

@Azzaare
  • Tags to string utility
tags(d) = mapreduce(x -> string(x), (y, z) -> y * "_" * z, d[:tags])
  • Visualization utilities
    • :alloc
function visu(x, d, ::Val{:allocs})
    mkpath(joinpath(@__DIR__, "visuals"))
    c = checkres_to_scatterlines(x, Val(:alloc))
    save(joinpath(@__DIR__, "visuals", "allocs_evolution_$(tags(d)).png"), c)

    for (name, c2) in checkres_to_pie(x, Val(:alloc))
        save(joinpath(@__DIR__, "visuals", "allocs_pie_$(name)_$(tags(d)).png"), c2)
    end
end
  • :benchmark
function visu(x, d, ::Val{:benchmark})
    mkpath(joinpath(d[:path], "visuals"))
    c = checkres_to_scatterlines(x, Val(:benchmark))
    save(joinpath(d[:path], "visuals", "bench_evolution_$(tags(d)).png"), c)

    for kwarg in [:times, :gctimes, :memory, :allocs]
        c2 = checkres_to_boxplots(x, Val(:benchmark); kwarg)
        save(joinpath(d[:path], "visuals", "bench_boxplots_$(kwarg)_$(tags(d)).png"), c2)
    end
end
  • :chairmark
function visu(x, d, ::Val{:chairmark})
    mkpath(joinpath(d[:path], "visuals"))
    c = checkres_to_scatterlines(x, Val(:chairmark))
    save(joinpath(d[:path], "visuals", "chair_evolution_$(tags(d)).png"), c)

    for kwarg in [:times, :gctimes, :bytes, :allocs]
        c2 = checkres_to_boxplots(x, Val(:chairmark); kwarg)
        save(joinpath(d[:path], "visuals", "chair_boxplots_$(kwarg)_$(tags(d)).png"), c2)
    end
end

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions