fix(enhancement): Added per stream fps threshold logic#236
Open
rishika-y-gaur wants to merge 5 commits into
Open
fix(enhancement): Added per stream fps threshold logic#236rishika-y-gaur wants to merge 5 commits into
rishika-y-gaur wants to merge 5 commits into
Conversation
Evaluate stream density per camera target FPS so mixed-camera ASC bundles stop only when each stream meets its own threshold. Resolves: intel-retail#235
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the stream-density benchmark’s stopping/scaling logic so mixed-camera bundles are evaluated against per-stream target FPS thresholds (derived from a camera config JSON), rather than using one shared FPS target for all streams.
Changes:
- Add camera-config JSON parsing to build a per-stream
targetFpsmap. - Update pass/fail + hysteresis evaluation to use per-stream thresholds.
- Adjust increment estimation to use an aggregate (mean) of per-stream targets.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+732
to
737
| average_target_fps = get_mean_target_fps(stream_target_fps, target_fps) | ||
| if os.getenv("STREAM_DENSITY_DEBUG", "0") == "1": | ||
| print('mean target fps:', average_target_fps) | ||
| increments = int(conservative_per_stream / average_target_fps) | ||
| if increments == 1: | ||
| increments = MAX_GUESS_INCREMENTS |
| print('fail_thresholds:', fail_thresholds) | ||
| print('passing_streams:', passing_streams) | ||
| print('failing_streams:', failing_streams) | ||
| print("INFO: All streams meet target" if all_streams_meet_target else "INFO: Not all streams meet target") |
Comment on lines
+74
to
+79
| missing_path = '/tmp/non-existent-camera-config-for-test.json' | ||
|
|
||
| with patch.dict(os.environ, {'CAMERA_STREAM': missing_path}, clear=False): | ||
| result = stream_density.build_per_stream_target_fps( | ||
| stream_fps_dict, default_target_fps=22.0 | ||
| ) |
5 tasks
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.
Evaluate stream density per camera target FPS so mixed-camera ASC bundles stop only when each stream meets its own threshold.
Resolves: #235
PR Checklist
What are you changing?
This PR updates stream-density stopping logic to use per-stream target FPS, so mixed-camera ASC bundles stop only when each stream meets its own threshold.
Issue this PR will close
close: #235
Anything the reviewer should know when reviewing this PR?
Per-stream pass/fail thresholds with hysteresis are now used instead of a single shared FPS target, and target FPS thresholds are taken from camera config JSON files.
Test Instructions if applicable
If the there are associated PRs in other repositories, please link them here (i.e. intel-retail/performance-tools )