This is a repo showing examples of doing performance testing on a shiny applications deployed on Connect.
You might also be interested in: https://github.com/leesahanders/demo_app_perf/tree/main
It has slides: https://questionable.quarto.pub/improving-app-performance-with-profvis/#/title-slide
- Deploy application to Connect
- Install shinyloadtest (Node.js 20+,
npx shinyloadtest@next) - Add environment variable
- Create "Recording" of a typical user's interaction
- Run load tests
- Analyze the results
The recording.log files in python-example-nba and r-example-geyser were made again on 2026-10-29. The Node.js shinyloadtest made them (shinyloadtest@next, version 2.0.0-alpha.6). They replay with no errors against Posit Connect 2026.07.0. The README in each folder lists the package versions that its recording matches. The recording in python-example-basic was not made again.
There are links to various additional and recommended resources sprinkled throughout, however here a few overview level recommendations:
Benchmarking / profiling tools
- Profiling your shiny app with profvis, shinyloadtest, shinytest2
- Plumber: profvis
- More granular profiling with microbenchmark
- Dash: Dash Dev Tools / pyinstrument
- Streamlit / Bokeh / Flask / FastAPI: pyinstrument
Mastering Shiny Shiny in production: Principles, practices, and tools Scaling and Performance Tuning in RStudio Connect Simulate runtime settings and events: Shimmer Shiny Sizing
- shinyloadtest (Node.js CLI) repo: https://github.com/posit-dev/shinyloadtest
- shinyloadtest npm package: https://www.npmjs.com/package/shinyloadtest
- shinyloadtest R package documentation (custom analysis of results): https://rstudio.github.io/shinyloadtest/
- shinyloadtest R package repo: https://github.com/rstudio/shinyloadtest/
- Connect specific article: https://rstudio.github.io/shinyloadtest/articles/load-testing-authenticated-apps.html
- Analyzing the results: https://rstudio.github.io/shinyloadtest/articles/analyzing-load-test-logs.html
- shinytest2 main documentation: https://rstudio.github.io/shinytest2/articles/use-application-audit.html#load-testing-with-shinytest2
- shinytest2 load testing: https://rstudio.github.io/shinytest2/articles/use-application-audit.html?q=load%20test#load-testing-with-shinytest2
- https://www.youtube.com/watch?v=Gucwz865aqQ
- https://www.youtube.com/watch?v=7KLv6HdIxvU
- https://github.com/schloerke/presentation-2022-07-28-rstudioconf22-shinytest2
- https://github.com/schloerke/presentation-2022-04-27-appsilon-shinytest2
- https://www.jumpingrivers.com/blog/end-to-end-testing-shinytest2-part-1/
- Cran whales: https://rstudio.github.io/promises/articles/casestudy.html
- Cran whales <talk: https://www.youtube.com/watch?v=Wy3TY0gOmJw>
- Cran whales article: https://cran.r-project.org/web/packages/promises/vignettes/casestudy.html
- Output: https://rpubs.com/jcheng/cranwhales-etl
- Cranwhales app: https://gallery.shinyapps.io/087-crandash/
- Install it yourself: https://github.com/rstudio/cranwhales
- Novartis developed shinyValidator: https://github.com/Novartis/shinyValidator
- shinyValidator slide deck: https://appsilonconf2022.rinterface.com/?panelset3=package-your-app2&panelset4=what2&panelset5=purpose2#1
- (Note that shinyValidator is not to be confused with shinyValidate which is used for input validation: https://rstudio.github.io/shinyvalidate/ )
- reactlog: https://rstudio.github.io/reactlog/
- shinytest2: https://rstudio.github.io/shinytest2/articles/use-application-audit.html
- Python load testing: https://locust.io/