# NOT RUN {
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
load_mtcars_example() # Get the code with drake_example("mtcars").
make(my_plan) # Run the project, build the targets.
config <- drake_config(my_plan)
known_times <- rep(7200, nrow(my_plan))
names(known_times) <- my_plan$target
known_times
# Predict the runtime
if (requireNamespace("lubridate", quietly = TRUE)) {
predict_runtime(
config = config,
jobs = 7,
from_scratch = TRUE,
known_times = known_times
)
predict_runtime(
config,
jobs = 8,
from_scratch = TRUE,
known_times = known_times
)
balance <- predict_workers(
config,
jobs = 7,
from_scratch = TRUE,
known_times = known_times
)
balance
}
}
})
# }
Run the code above in your browser using DataLab