resources: track system resources

View source: R/resources.q

resourcesR Documentation

track system resources

Description

track system resources during evaluation of an expression

Usage

resources(expr, doPrint=TRUE)

Arguments

expr

An expression to be evaluated by eval() within the sys.parent() evaluation frame.

doPrint

Logical, print the resource information in the call?

Details

The resources given by Venebles and Ripley had reported both Cache and Working memory usage. S-PLUS 7 no longer tracks Cache usage, so we only report the Working. Similarly, R has Ncells and Vcells, and the more important measure for users is Vcells, the memory heap.

Value

Return the data frame that is printed by default if the object is saved to a value (via invisible()). The expression is evaluated and details are printed for CPU time, overall time, child process time, and heap space memory usage.

References

Venebles WN, Ripley BD. "Statistics and Computing." Springer-Verlag, New York, NY, 2000. (page 151.)

See Also

proc.time, R: gc, S-PLUS: mem.tally.reset, mem.tally.report

Examples

resources({
  norm.dat = rnorm(10000) 
  norm.mat = matrix(rnorm(10000), nrow=100)
})

ibdreg documentation built on Nov. 16, 2022, 5:14 p.m.