tests/testthat/helper-file.R

read_inst_rprof <- function(path) {
  read_inst(path, read_rprof)
}

read_inst_pprof <- function(path) {
  read_inst(path, read_pprof)
}

read_inst <- function(path, reader) {
  search_path <- file.path(c("samples", "inst/samples"), path)
  full_path <- system.file(search_path, package = "profile")
  reader(full_path[[1]])
}

Try the profile package in your browser

Any scripts or data that you put into this service are public.

profile documentation built on Aug. 22, 2022, 9:10 a.m.