
Check estimation time for models run with various threads values
Source:R/test-threads.R
check_run_times.RdCheck estimation time for models run with various threads values
Arguments
- .mods
a bbi model object or list of model objects. Generally created by
test_threads().- .return_times
character vector denoting which times from
model_summary()you want to return. See details for more information.- .wait
logical. If TRUE, pass
.modstowait_for_nonmem()before returning results.- ...
args passed through to
wait_for_nonmem().
Value
A tibble with columns threads (number of threads) and time
(elapsed estimation time in seconds for test models).
Details
.return_times can be any subset of c("estimation_time", "covariance_time", "postprocess_time", "cpu_time").
Users can also specify "all", which is the shorthand method for selecting all 4 of those columns.
Examples
if (FALSE) { # \dontrun{
mods <- test_threads(mod, .threads = c(2, 4))
# If models have not finished:
check_run_times(mods, .wait = TRUE, .time_limit = 300)
check_run_times(mods, .wait = TRUE, .return_times = c("estimation_time", "covariance_time"))
# If models have already finished:
check_run_times(mods, .wait = FALSE)
check_run_times(mods, .wait = FALSE, .return_times = "all")
} # }