unpack_timing: Unpack timing information

Description Usage Arguments Value See Also Examples

View source: R/benchmark_timing_tbl_methods.R

Description

Takes the result of a time_methods() call and remove the 'timed_result' column, replacing it with three columns of durations representing the 'system', 'user' and 'elapsed' times from a system.time() call.

Usage

1
2
3
4
unpack_timing(x)

## S3 method for class 'benchmark_timing_tbl'
unpack_timing(x)

Arguments

x

the benchmark_timing_tbl object

Value

a tibble containing pipeline steps and timing information

See Also

strip_timing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
datasets <- list(
    data1 = c(1, 2, 3)
)

transforms <- list(
    log = function(x) { Sys.sleep(0.1); log(x) },
    sqrt = function(x) { Sys.sleep(0.1); sqrt(x) }
)

datasets %>%
    time_methods(transforms) %>%
    unpack_timing()

## End(Not run)

CellBench documentation built on Nov. 8, 2020, 5:11 p.m.