ReportMetrics.jl

A package for reporting metrics (e.g., allocations)
Author CliMA
Popularity
4 Stars
Updated Last
2 Years Ago
Started In
January 2022

ReportMetrics.jl

GHA CI gha ci
Code Coverage codecov
Bors enabled bors

A package for reporting metrics (e.g., allocations), which builds ontop of Coverage.jl

Example

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) │                                         │
├───────────────┼─────────────┼─────────────────────────────────────────┤
│            777996800 │ ReportMetrics.jl/test/rep_workload.jl:7 │
│            232387200 │ ReportMetrics.jl/test/rep_workload.jl:6 │
└───────────────┴─────────────┴─────────────────────────────────────────┘

Used By Packages

No packages found.