HenrikBengtsson / profmem

🔧 R package: profmem - Simple Memory Profiling for R
https://cran.r-project.org/package=profmem
35 stars 2 forks source link

Shiny-based example #19

Open benkates opened 4 years ago

benkates commented 4 years ago

Hi there, I'm interested in applying this to Shiny apps - is that possible? Or would you recommend just using profvis?

HenrikBengtsson commented 4 years ago

profmem() returns raw results as a data.frame. There are no visualization tools and so on, if that's what you're asking for.

benkates commented 4 years ago

I'm looking for an example of running profmem() on the server() function for a Shiny app and if that would even work. Doesn't matter if the result is a visual.

HenrikBengtsson commented 4 years ago

stats <- profmem::profmem({ expr }) will benchmark whatever R expression expr you pass to it. I don't know how to get the Shiny server() code to do do. Maybe this is a question for the Shiny folks? I'd expect the solution to be very similar to how it's done for profvis::profvis().