powered by
Evaluates `pc_batch()` execution under multiple chunk-size and parallel settings and returns runtime and failure metrics.
pc_benchmark( ids, fn, chunk_sizes = c(25, 50, 100), parallel_options = c(FALSE), workers = NULL, ... )
A tibble with runtime and success metrics for each benchmark scenario.
Identifier vector.
Function applied by `pc_batch()`.
Integer vector of chunk sizes.
Logical vector controlling parallel toggle.
Number of workers used when parallel is enabled.
Additional arguments passed to `fn`.
This benchmark is intended for tuning operational parameters before running large production queries.
bm <- pc_benchmark( ids = 1:20, fn = function(chunk_ids, ...) sum(chunk_ids), chunk_sizes = c(5, 10), parallel_options = FALSE ) nrow(bm)
Run the code above in your browser using DataLab