xrprof - profile R programs
Contents
Description
A sampling profiler for R(1) programs. xrprof writes to standard output the Rprof.out format widely used
by existing R-based tools.
Examples
Sample from an existing R program for 5 seconds at a useful frequency:
$ xrprof -F 50 -d 5 -p `pidof R`
Start a new R program in the background and then start the profiler, writing samples to the file
Rprof.out in the current directory:
$ Rscript myprogram.R &
$ xrprof -F 50 -p $! > Rprof.out
Exit Status
0 Successful program execution.
1 A fatal error ocurred during sampling.
Name
xrprof - profile R programs
Options
Malformed arguments will fall back on the defaults, if possible.
-h Print usage and exit.
-pPID Specify the pid of the target R program.
-FFREQ
Set the sampling frequency, in Hertz. The default is 1 Hz, i.e. one sample per second, and the
maximum is 1000 Hz (though far fewer samples are usually required).
-dDURATION
Set the duration for xrprof to take samples before exiting (provided the target program runs that
long). The default is to last up to one hour.
-oFILE
Write output to FILE instead of standard output.
-m Run in “mixed mode”, where samples are drawn from both the R-level and native C/C++ stacks and
collated together.
See Also
R(1), Rscript(1) 2020-01-11 XRPROF(1)
Synopsis
xrprof [-h] [-m] [-FFREQ] [-dDURATION] [-oFILE] -pPID
