bench (version 1.1.3)

bench_memory: Measure memory that an expression used.

Description

Measure memory that an expression used.

Usage

bench_memory(expr)

Value

A tibble with two columns

  • The total amount of memory allocated

  • The raw memory allocations as parsed by profmem::readRprofmem()

Arguments

expr

A expression to be measured.

Examples

Run this code
if (capabilities("profmem")) {
  bench_memory(1 + 1:10000)
}

Run the code above in your browser using DataLab