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

Random walk series for plot benchmarks #4903

Merged
merged 7 commits into from
Jan 26, 2024

Conversation

nikolausWest
Copy link
Member

@nikolausWest nikolausWest commented Jan 25, 2024

Adds a "Gaussian Random Walk" method to the plot dashboard benchmark.

Also fixes "sim_time" to be in seconds and be consistent with the frequency argument.

  • Python:
    • just py-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type gaussian-random-walk --save plot_gauss_py.rrd
    • just py-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type sin-uniform --save plot_uniform_py.rrd
  • Rust:
    • just rs-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type gaussian-random-walk --save plot_gauss_rs.rrd
    • just rs-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type sin-uniform --save plot_uniform_rs.rrd
  • C++:
    • just cpp-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type gaussian-random-walk --save plot_gauss_cpp.rrd
    • just cpp-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000 --series-type sin-uniform --save plot_uniform_cpp.rrd

image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@nikolausWest nikolausWest added 🚀 performance Optimization, memory use, etc exclude from changelog PRs with this won't show up in CHANGELOG.md labels Jan 25, 2024
@teh-cmc teh-cmc force-pushed the niko/add-series-type-to-benchmark branch from ec396e1 to 799cf84 Compare January 25, 2024 12:43
teh-cmc added a commit that referenced this pull request Jan 25, 2024
⚠️ [Try it
live!](https://app.rerun.io/pr/4865/index.html?url=https://storage.googleapis.com/rerun-builds/pull_request/4865/plot_gauss2.rrd)
:warning:

Make it so users can configure an aggregation strategy in the rare case
where they either have so much data or are so zoomed out that most of
their plot results in an overdraw blurb.

Because this builds on top of the range cache, the data is neatly laid
out in a memory slice already so this is very cheap to compute.

In my tests, the `MinMax` strategy has worked so well that I've decided
to make it the default in the end... That might be controversial
:no_mouth:.

`Off` vs. `MinMax`, using the [new gaussian walk
benchmark](#4903):
![image
(26)](https://github.com/rerun-io/rerun/assets/2910679/1811becb-d213-44bb-87ea-0e4a7fa058ad)
![image
(27)](https://github.com/rerun-io/rerun/assets/2910679/b8d66c92-8719-4de5-a3cb-72c2ea4b1e96)
 


- Fixes #4271 
- DNR: requires #4856
@teh-cmc teh-cmc force-pushed the niko/add-series-type-to-benchmark branch from 799cf84 to c3ce11c Compare January 25, 2024 18:03
@teh-cmc
Copy link
Member

teh-cmc commented Jan 26, 2024

Saving a gaussian random walk to file

Args:

--num-plots 10
--num-series-per-plot 5
--num-points-per-series 5000
--freq 1000
--series-type gaussian-random-walk

Python:

logged 25550 scalars over 1.0s (freq=25543.508Hz, expected=50000.0Hz, load=754.952%)
logged 27350 scalars over 1.0s (freq=27339.616Hz, expected=50000.0Hz, load=236.44%)
logged 27950 scalars over 1.001s (freq=27932.918Hz, expected=50000.0Hz, load=214.696%)
logged 29350 scalars over 1.001s (freq=29331.363Hz, expected=50000.0Hz, load=205.755%)
logged 29850 scalars over 1.001s (freq=29832.375Hz, expected=50000.0Hz, load=207.829%)
logged 30250 scalars over 1.001s (freq=30207.163Hz, expected=50000.0Hz, load=201.035%)
logged 29800 scalars over 1.002s (freq=29752.806Hz, expected=50000.0Hz, load=227.308%)
logged 29900 scalars over 1.001s (freq=29878.672Hz, expected=50000.0Hz, load=231.528%)
logged 20000 scalars over 0.676s (freq=29582.716Hz, expected=50000.0Hz, load=211.143%)

Rust:

logged 50050 scalars over 1.000423729s (freq=50028.801Hz, expected=50000.000Hz, load=41.337%)
logged 50000 scalars over 1.000452354s (freq=49977.393Hz, expected=50000.000Hz, load=38.216%)
logged 50000 scalars over 1.000493239s (freq=49975.350Hz, expected=50000.000Hz, load=49.272%)
logged 50000 scalars over 1.000597015s (freq=49970.167Hz, expected=50000.000Hz, load=26.132%)
logged 49950 scalars over 1.000550035s (freq=49922.541Hz, expected=50000.000Hz, load=44.966%)

C++:

logged 50050 scalars over 1.00029s (freq=50035.6Hz, expected=50000Hz, load=72.1643%)
logged 50000 scalars over 1.00012s (freq=49993.9Hz, expected=50000Hz, load=92.0067%)
logged 50050 scalars over 1.00099s (freq=50000.6Hz, expected=50000Hz, load=73.7993%)
logged 50000 scalars over 1.00012s (freq=49994.2Hz, expected=50000Hz, load=58.2881%)
logged 49900 scalars over 0.998841s (freq=49957.9Hz, expected=50000Hz, load=77.5741%)

@nikolausWest nikolausWest merged commit c9c4236 into main Jan 26, 2024
40 checks passed
@nikolausWest nikolausWest deleted the niko/add-series-type-to-benchmark branch January 26, 2024 09:41
@teh-cmc teh-cmc changed the title Random walk series for plot benchmark in python Random walk series for plot benchmarks Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🚀 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants