Measure memory that an expression used.
Value
A tibble with two columns
The total amount of memory allocated
The raw memory allocations as parsed by
profmem::readRprofmem()
Examples
if (capabilities("profmem")) {
bench_memory(1 + 1:10000)
}
#> # A tibble: 1 × 2
#> mem_alloc memory
#> <bch:byt> <list>
#> 1 117KB <Rprofmem [2 × 3]>