-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce
rerun compare
to check whether 2 rrd files are functional…
…ly equivalent (#2597) 1. Run some example and save the result to an .rrd file: ``` $ ./examples/python/clock/main.py --steps 50 --save examples/python/clock/out1.rrd ``` 2. Do it again: ``` $ ./examples/python/clock/main.py --steps 50 --save examples/python/clock/out2.rrd ``` 3. Compare these two rrd files: ``` $ cargo r -p rerun-cli --quiet -- compare examples/python/clock/out1.rrd examples/python/clock/out2.rrd $ echo $? 0 ``` 3. Modify the example slightly, and save it to a third rrd file: ``` $ vim ./examples/python/clock/main.py $ git diff - color_m = (int(255 - (scaled_m * 255)), int(scaled_m * 255), 128, 128) + color_m = (int(255 - (scaled_m * 255)), int(scaled_m * 250), 128, 128) $ ./examples/python/clock/main.py --steps 50 --save examples/python/clock/out1.rrd ``` 4. Compare the two .rrd files ``` $ cargo r -p rerun-cli --quiet -- compare examples/python/clock/out1.rrd examples/python/clock/out3.rrd ``` ![image](https://github.com/rerun-io/rerun/assets/2910679/70be3ec3-cf4f-4584-affc-46b72154fc9b) ``` $ echo $? 1 ``` --- ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2597) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2597) - [Docs preview](https://rerun.io/preview/pr%3Acmc%2Fcompare_rrd/docs) - [Examples preview](https://rerun.io/preview/pr%3Acmc%2Fcompare_rrd/examples)
- Loading branch information
Showing
5 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters