get_profile_dir() / set_profile_dir() locate the interpolation
profile log: four CSV files (interp_runs.csv, interp_stages.csv,
interp_maps.csv, interp_params.csv) that every interpolate_model()
call appends its per-stage / per-map / per-parameter timing and memory
readings to (R heap, per-stage heap peak, OS process RSS and its
process-lifetime peak). When unset, the tables land next to the
operation log if one is set, else under <project>/logs/ when a
project registry exists; with no sink resolvable nothing is written.
The operation log is an optional, project-wide record of what ran:
set_log_file() names a CSV file, and from then on
interpolate_model(), solve_scenario() (and through it
solve_model()), and solve_recursive() append one line each —
timestamp, op, object, status, duration_sec, details. read_log()
reads it back as a tibble with parsed timestamps.
Levcost's internal mini-model solves are not logged (their scratch
scenarios are dot-prefixed). Per-run solver detail lives in each run's
run.yml (see scenario_runs()); the log records the sequence.
Usage
set_log_file(path = NULL)
get_log_file()
set_profile_dir(path = NULL)
get_profile_dir()
read_log(file = get_log_file())Examples
if (FALSE) { # \dontrun{
set_log_file("energyRt_log.csv")
scen <- interpolate_model(mod) |> solve_scenario()
read_log()
} # }
