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

Simple logging benchmarks for C++ & Rust #4181

Merged
merged 14 commits into from Nov 9, 2023
Merged

Simple logging benchmarks for C++ & Rust #4181

merged 14 commits into from Nov 9, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Nov 8, 2023

What

Implements SDK sided logging benchmark for C++ & Rust.
Kept as simple as possible, meant for whole-process profiling so we capture all sideeffects. This makes tthe data generation ('prepare') inside the benchmark apps ofc quite tricky as it has to be as fast as possible.
Additionally, both Rust & Cpp app expose a way to get more fine grained logging. Cpp does this via a simple profiler scope, Rust via Puffin/re_tracing.

Logging always happens to a memory recording.
Data is currently never passed in in the Rerun format

Contains the tree initial benchmarks we wanted to have:

  • points3d_large_batch
    • Single batch of 50mio points (color, position, radius, single label)
  • points3d_many_individual
    • 1mio individual points with different time stamp each (color, position, radius)
  • image
    • log 4 different 16k x 16k RGBA8 images (4GiB of memory!)

Running instructions in main.rs & main.cpp!

Timings on my M1 Max in seconds
(tests are not perfectly comparable, they do not do the exact same thing. Prepare times are also slightly different and most significant in the _large_batch test)

  • points3d_large_batch
    • C++: 0.94s
    • Rust: 1.34s
  • points3d_many_individual
    • C++: 16.86s (⚠️ there's almost certainly some involuntary allocation going on there)
    • Rust: 2.75s
  • image
    • C++: 3.11s
    • Rust: 1.10s

Missing

  • Python version
  • utility script for building, running and publishing data

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 demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added 🧑‍💻 dev experience developer experience (excluding CI) include in changelog labels Nov 8, 2023
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Very informative to have these.

tests/rust/log_benchmark/src/image.rs Show resolved Hide resolved
@Wumpf Wumpf merged commit 1aa220a into main Nov 9, 2023
40 checks passed
@Wumpf Wumpf deleted the andreas/log-benchmarks branch November 9, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants