R/zzz.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname) {
  op <- options()
  cache <- tibble::tibble(
    branch = character(), md5_hashes = list(), path_pkg = character()
  )

  op_touchstone <- list(
    "touchstone.skip_install" = FALSE,
    "touchstone.git_root" = find_git_root(),
    "touchstone.dir" = "touchstone",
    # how many times should inner loop be ran in benchmark_run_iteration
    "touchstone.n_iterations" = 1,
    "touchstone.hash_source_package" = cache
  )

  toset <- !(names(op_touchstone) %in% names(op))
  if (any(toset)) options(op_touchstone[toset])
  invisible()
}
lorenzwalthert/touchstone documentation built on April 20, 2024, 9:57 a.m.