check_run_times: Check estimation time for models run with various threads...

View source: R/test-threads.R

check_run_timesR Documentation

Check estimation time for models run with various threads values

Description

Check estimation time for models run with various threads values

Usage

check_run_times(.mods, .return_times = "estimation_time", .wait = TRUE, ...)

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 .mods to wait_for_nonmem() before returning results.

...

args passed through to wait_for_nonmem().

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.

Value

A tibble with columns threads (number of threads) and time (elapsed estimation time in seconds for test models).

Examples

## Not run: 
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")

## End(Not run)

metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.