R/test-threads.R
check_run_times.RdCheck estimation time for models run with various threads values
check_run_times(.mods, .return_times = "estimation_time", .wait = TRUE, ...)a bbi model object or list of model objects. Generally created by test_threads().
character vector denoting which times from model_summary() you want to return.
See details for more information.
logical. If TRUE, pass .mods to wait_for_nonmem() before returning results.
args passed through to wait_for_nonmem().
A tibble with columns threads (number of threads) and time
(elapsed estimation time in seconds for test models).
.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.
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")
} # }