GHA CI | |
Code Coverage | |
Bors enabled |
A package for reporting metrics (e.g., allocations), which builds ontop of Coverage.jl
See our test suite for an example usage:
import ReportMetrics
ma_dir = pkgdir(ReportMetrics)
ReportMetrics.report_allocs(;
job_name = "RA_example",
run_cmd = `$(Base.julia_cmd()) --project --track-allocation=all $(joinpath(ma_dir, "test", "rep_workload.jl"))`,
deps_to_monitor = [ReportMetrics],
dirs_to_monitor = [joinpath(ma_dir, "test")],
process_filename = x -> replace(x, dirname(ma_dir) => ""),
)
prints out:
[ Info: RA_example: Number of unique allocating sites: 2
┌───────────────┬─────────────┬─────────────────────────────────────────┐
│ Allocations % │ Allocations │ <file>:<line number> │
│ (xᵢ/∑x) │ (bytes) │ │
├───────────────┼─────────────┼─────────────────────────────────────────┤
│ 77 │ 7996800 │ ReportMetrics.jl/test/rep_workload.jl:7 │
│ 23 │ 2387200 │ ReportMetrics.jl/test/rep_workload.jl:6 │
└───────────────┴─────────────┴─────────────────────────────────────────┘