read_rprof | R Documentation |
These functions read profile data from files, or store profile data to files.
Readers call validate_profile()
on input, writers on output.
read_rprof()
reads a file generated by Rprof()
, write_rprof()
writes
in a compatible format.
read_pprof()
reads a file generated by pprof -proto
, write_pprof()
writes a Gzip-compressed file that can be processed with pprof
.
read_rprof(path, ..., version = "1.0") read_pprof(path, ..., version = "1.0") write_rprof(x, path) write_pprof(x, path)
path |
File name |
... |
Ignored |
version |
Version of the data, currently only |
x |
Profiler data, see |
Use the proftools, profvis, or prof.tree R packages to
further analyze files created by the write_rprof()
function.
Use the pprof
tool in conjunction with
the _pprof()
functions. The tool is available in the pprof R package,
or (in newer versions) via go get github.com/google/pprof
.
Valid profile data (readers), input data (writers).
rprof_file <- system.file("samples/rprof/1.out", package = "profile") ds <- read_rprof(rprof_file) ds if (requireNamespace("RProtoBuf", quietly = TRUE)) { pprof_file <- tempfile("profile", fileext = ".pb.gz") write_pprof(ds, pprof_file) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.