feat(poi): improve benchmark latency measurement and reliability#225
Merged
Conversation
- Use VLM metrics files as primary latency source (matching SAD pattern) - Prefer mqtt_received_at over frame timestamp in alerts API fallback - Add early exit on first alert for single benchmark mode - Add benchmark_duration parameter for configurable wait time - Filter stale alerts using iteration start timestamp - Skip container recreation when services already running - Add dual latency method: single run vs stream density - Clean metrics files before each iteration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the POI stream-density benchmark script to improve latency measurement fidelity and benchmark reliability by prioritizing VLM metrics files, improving alerts-based fallback, and adding a dedicated single-benchmark mode with configurable duration and early-exit behavior.
Changes:
- Prefer
vlm_application_metricsfiles as the primary latency source, with a stream-density-specific extractor (last N pairs) and alerts API as a fallback. - Improve alerts API parsing by preferring
mqtt_received_at, filtering stale alerts using an iteration start timestamp, and applying the same filtering when saving thumbnails. - Add single-run benchmark enhancements: configurable
BENCHMARK_DURATION, early exit on first alert, and skipping container recreation when key services are already running.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Normalize timestamps to UTC-aware before subtraction to prevent TypeError on mixed tz-aware/naive datetime arithmetic - Track which start field was used (mqtt_received_at vs timestamp) and log an accurate label accordingly - Fix poll overshoot: sleep min(poll_interval, remaining) so _wait_for_alert_or_timeout respects the exact duration - Use actual elapsed time for docker log collection window in single-run mode instead of stabilise_duration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sachinkaushik
approved these changes
May 22, 2026
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.
PR Checklist
What are you changing?
Issue this PR will close
close: #issue_number
Anything the reviewer should know when reviewing this PR?
Test Instructions if applicable
If the there are associated PRs in other repositories, please link them here (i.e. intel-retail/performance-tools )