File: helper-profvis.R

package info (click to toggle)
r-cran-profvis 0.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 868 kB
  • sloc: javascript: 1,943; ansic: 41; sh: 13; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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))
}