Skip to content

CliMA/ReportMetrics.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 │
└───────────────┴─────────────┴─────────────────────────────────────────┘

About

A package for reporting metrics (e.g., allocations)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages