tests/testthat/helper-profvis.R

TEST_PAUSE_TIME <- 0.050

call_stacks <- function(x) {
  prof <- x$x$message$prof
  stacks <- split(prof$label, prof$time)
  vapply(stacks, paste, "", collapse = " ")
}

modal_call <- function(x) {
  modal_value0(call_stacks(x))
}

profile_calls <- function(x) {
  prof <- x$x$message$prof
  stacks <- split(prof$label, prof$time)
  vapply(stacks, paste, "", collapse = " ")
}

profile_mode <- function(x) {
  modal_value0(profile_calls(x))
}

Try the profvis package in your browser

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

profvis documentation built on Sept. 20, 2024, 5:10 p.m.