Fix: unify --rounds flag and disable profiling when rounds > 1#574
Merged
ChaoWao merged 1 commit intohw-native-sys:mainfrom Apr 16, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the -n short flag for the --rounds argument and implements logic to disable profiling when multiple rounds are executed, accompanied by a warning. Feedback suggests that the check in run_example.py should also account for rounds defined in configuration files rather than just command-line arguments. Additionally, it is recommended to initialize logging before issuing the profiling warning in scene_test.py to ensure the warning is captured correctly by the logging system.
6bfc83e to
e9d4a97
Compare
Remove -n short form for --rounds in run_example.py and scene_test.py standalone entry to match pytest's conftest.py (which only defines --rounds). Automatically disable --enable-profiling when --rounds > 1 with a logger.warning, since profiling only captures the first round and multi-round mode is for benchmarking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e9d4a97 to
fa5393e
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
-nshort form for--roundsinrun_example.pyandscene_test.pystandalone entry to match pytest'sconftest.py(which only defines--rounds)--enable-profilingwhen--rounds > 1with a warning, since profiling only captures the first round and multi-round mode is for benchmarkingTesting
--rounds 3 --enable-profilingprints warning and disables profiling--rounds 1 --enable-profilingstill works normally