bench_memory: Measure memory that an expression used.

View source: R/bench_time.R

bench_memoryR Documentation

Measure memory that an expression used.

Description

Measure memory that an expression used.

Usage

bench_memory(expr)

Arguments

expr

A expression to be measured.

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)
}

r-lib/bench documentation built on May 6, 2023, 10:51 a.m.