[help] How to get current pipeline overall seconds used? #1289
-
Help
DescriptionThis is to ask what the suggested way is to calculate the overall amount of time the current (successful) pipeline spends on execution. My current idea is the following: tar_meta(fields = c(seconds, warnings, error)) |>
dplyr::filter(is.na(warnings), is.na(error), !is.na(seconds)) |>
dplyr::pull(seconds) |>
sum() But I'd like to know if it will count targets that are no longer in the pipeline but still stored on meta (i.e., the ones that would be removed by Thank you! UPDATE after answerSo the suggested solution is: tar_meta(
tar_manifest()[["name"]],
fields = c(seconds, warnings, error)
) |>
dplyr::filter(is.na(warnings), is.na(error), !is.na(seconds)) |>
dplyr::pull(seconds) |>
sum() Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a bit of a subtly tricky questions because of how parallel computing dynamically schedules the targets as parallel workers become available, but what you propose should be fine if you restrict the |
Beta Was this translation helpful? Give feedback.
This is a bit of a subtly tricky questions because of how parallel computing dynamically schedules the targets as parallel workers become available, but what you propose should be fine if you restrict the
tar_meta()
output to the targets listed bytar_manifest()$name
.