0
Successful program execution.
Profile r programs
xrprof [-h]
[-m]
[-F
FREQ]
[-d
DURATION]
[-o
FILE]
-p
PID
A sampling profiler for R(1) programs. xrprof writes to standard output the Rprof.out format widely used by existing R-based tools.
Malformed arguments will fall back on the defaults, if possible.
-h
Print usage and exit.
-p PID
Specify the pid of the target R program.
-F FREQ
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).
-d DURATION
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.
-o FILE
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.
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
0
Successful program execution.
1
A fatal error ocurred during sampling.
Unchanged in 2 releases since Debian 12 (Bookworm).