Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plot dashboard stress tool for C++ (#4600)
Adds stress tool to simulate end-to-end plot dashboard workloads in order to gauge the cost of each step in the way. The CLI arg parsing is done using [cxxopts](https://github.com/jarro2783/cxxopts), which seems to be the sane header-only de-facto standard the everybody recomments on the internets. I've vendored it besides the tool itself, which is probably not where we want it (assuming that's what we want to use). Also, we don't have an abstraction in C++ for standard Rerun flags 😭 `just cpp-plot-dashboard --help` gives a pretty good idea of what you're in for: ``` Plot dashboard stress test Usage: plot_dashboard_stress [OPTION...] -h, --help Print usage --spawn Start a new Rerun Viewer process and feed it data in real-time --connect Connects and sends the logged data to a remote Rerun viewer --stdout Log data to standard output, to be piped into a Rerun Viewer --num-plots arg How many different plots? (default: 1) --num-series-per-plot arg How many series in each single plot? (default: 1) --num-points-per-series arg How many points in each single series? (default: 100000) --freq arg Frequency of logging (applies to all series) (default: 1000.0) --order arg What order to log the data in ('forwards', 'backwards', 'random') (applies to all series) (default: forwards) ``` ## Example - 10 plots - 5 series per plot - 5000 points per series - log 1000 points per series per second ### C++ Casually breezin' through: ``` $ just cpp-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 logged 50050 scalars over 1.000277763s (freq=50036.102Hz, expected=50000.000Hz, load=31.367%) logged 50000 scalars over 1.000359198s (freq=49982.047Hz, expected=50000.000Hz, load=31.741%) logged 50000 scalars over 1.000592801s (freq=49970.378Hz, expected=50000.000Hz, load=33.446%) logged 50000 scalars over 1.000630557s (freq=49968.492Hz, expected=50000.000Hz, load=46.129%) logged 49950 scalars over 1.000663673s (freq=49916.872Hz, expected=50000.000Hz, load=34.742%) ``` Co-authored-by: Andreas Reich <[email protected]>
- Loading branch information