Python benchmark for transform logging over time #7039
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Adds a new log benchmark for transforms, python only for the moment (will likely add C++ and Rust as part of #6810).
Also, fixes the python benchmark setup to use release builds (oops!).
Benchmark results on my windows machine:
In short: logging 10k transforms with rotation/scale/transform on an incrementing integer timescale takes:
batch count scales pretty much linear which implies that each log call has roughly the same overhead, independent of the number of transforms logged.
(note that this benchmark logs to a memory recording)
To confirm this I took Jeremy's quick benchmark from the ticket and extended it a bit to include batches:
Results for this on my windows machine (Python 3.11.9, AMD 7950X3D), each median out of 3 runs with respective viewer version already open:
Time to log 1000 transforms: 0.296s. (3377.211s transforms / sec)
main
:Time to log 1000 transforms: 0.077s. (13070.399s transforms / sec)
main
:Time to log 1000 transform with time in a single call: 0.003s. (333383.992s transforms / sec)
So according to this simple benchmark it's about 3.9 times more transforms per second for individual log and (not entirely comparable and probably measure accuracy bound) factor 99.
I did not check this benchmark in since it's a bit too one-off, in particular the batch log I added is too unscientific
Verdict overall:
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.