Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Appsilon/shiny.tictoc
Measuring shiny performance in the browser.
https://github.com/Appsilon/shiny.tictoc
Last synced: 3 months ago
JSON representation
Measuring shiny performance in the browser.
- Host: GitHub
- URL: https://github.com/Appsilon/shiny.tictoc
- Owner: Appsilon
- Created: 2023-12-18T11:18:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-08T12:29:11.000Z (10 months ago)
- Last Synced: 2024-03-21T02:45:35.565Z (8 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-shiny-extensions - shiny.tictoc - Measure Shiny app performance in the browser. (Developer Tools / Profiling)
- jimsghstars - Appsilon/shiny.tictoc - Measuring shiny performance in the browser. (JavaScript)
README
# shiny.tictoc
`{shiny.tictoc}` allows you to measure:
1. How much time your Shiny app is spending doing server side calculations
2. How long does it take to recalculate outputs in your appand export results in form of a CSV file. All that without the need of installing additional software and setting up testing scenarios - everything happens in the browser.
## Getting Started
To start using `shiny.tictoc` in your app, just add the following line somewhere in your UI definition (see example [here](./examples/app.R)):
```r
tags$script(
src = "https://cdn.jsdelivr.net/gh/Appsilon/[email protected]/shiny-tic-toc.min.js"
)
```Next, open your app and interact with it.
To access the benchmarks [open the browser devtools](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Tools_and_setup/What_are_browser_developer_tools) (Windows: F12, macOS ⌘ + ⌥ + I) and in the console run:
```js
// Print out all measurements
showAllMeasurements()// To download all measurements as a CSV file
exportMeasurements()// To print out summarised measurements (slowest rendering output, slowest server computation)
showSummarisedMeasurements()// To export an html file that visualizes measurements on a timeline
await exportHtmlReport()
```