system.cache: Cache

Description Usage Arguments Details Value Examples

Description

Measuring cache misses, hits, accesses, and reads.

Usage

1
2
system.cache(expr, type = "miss", events = "total", gcFirst = TRUE,
  burnin = TRUE)

Arguments

expr

A valid R expression to be profiled.

type

The type of cache event to profile; options are "miss", "hit", "access", and "read".

events

The class of cache events to profile; options are "total", "data", "instruction", "all", "l1.all", "l2.all", "l3.all", "l1.ratio", "l2.ratio", and "l3.ratio".

gcFirst

logical; determines if garbage collection should be called before profiling.

burnin

logical; determines if the function should first be evaluated with an empty expression.

Details

This function measures the evaluation of the provided expression, expr, for different classes of cache events additionally restricted to misses, hits, accesses, or reads. The additional arguments, gcFirst and burnin, can be toggled to better simulate the target context.

Value

The results of the requested PAPI events are returned, in a named list, with values stored in double precision.

Examples

1
2
3
4
5
6
## Not run: 
library(pbdPAPI)

system.cache(1+1, type="miss", events="l2.all")

## End(Not run)

RBigData/pbdPAPI documentation built on May 8, 2019, 5:48 a.m.