Do a test run of pprof()
to verify that the
system dependencies like pprof
work as expected.
test_pprof(
host = "localhost",
port = proffer::random_port(),
browse = interactive(),
verbose = TRUE
)
Host name. Set to "localhost"
to view locally
or "0.0.0.0"
to view from another machine. If you view
from another machine, the printed out URL will not be valid.
For example, if pprof()
or serve_pprof()
prints
"http://0.0.0.0:8080", then you need to replace 0.0.0.0
with your computer's name or IP address, e.g.
"http://my_computer.com:8080".
Port number for hosting the local pprof server. Chosen randomly by default.
Logical, whether to open a browser to view the pprof server.
Logical, whether to print console messages
such as the URL of the local pprof
server.
See https://github.com/r-prof/proffer#installation for setup instructions.
if (identical(Sys.getenv("PROFFER_EXAMPLES"), "true")) {
test_pprof()
}