Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Rprof(append = TRUE) #9

Open
krlmlr opened this issue Feb 25, 2020 · 0 comments
Open

Support Rprof(append = TRUE) #9

krlmlr opened this issue Feb 25, 2020 · 0 comments

Comments

@krlmlr
Copy link
Member

krlmlr commented Feb 25, 2020

Profiles with append = TRUE trigger a warning when read.

library(profile)

rprof <- proffer::record_rprof(replicate(1e2, sample.int(1e4)))
prof <- read_rprof(rprof)

rprof <- proffer::record_rprof(replicate(1e2, sample.int(1e4)), rprof = rprof, append = TRUE)
prof2 <- read_rprof(rprof)
#> Warning: Incomplete sampling information, increase bufsize in `Rprof()` or
#> `start_profiler()` call

cat(readLines(rprof), sep = "\n")
#> sample.interval=20000
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" 
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" 
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" 
#> sample.interval=20000
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" 
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" 
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "proffer::record_rprof" "eval" "eval" "withVisible" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch" "try" "handle" "timing_fn" "evaluate_call" "evaluate::evaluate" "evaluate" "in_dir" "block_exec" "call_block" "process_group.block" "process_group" "withCallingHandlers" "process_file" "knitr::knit" "rmarkdown::render" "<Anonymous>" "<Anonymous>" "do.call" "saveRDS" "withCallingHandlers" "doTryCatch" "tryCatchOne" "tryCatchList" "doTryCatch" "tryCatchOne" "tryCatchList" "tryCatch"

Created on 2020-02-25 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant