CI Performance Gates for Flutter Physical AI Companion Apps
Performance regressions can arrive through unrelated changes: a new chart, extra JSON parsing, larger images, or more frequent state emissions. Automated gates catch some before release.
Choose a stable test setup
Use profile or release-like builds. Keep device, OS, power state, and workload consistent across comparisons.
Gate product-relevant metrics
Track frame build/raster time, startup, memory growth, decode time, queue depth, and telemetry age. Avoid one threshold for every device.
Store a baseline
Record commit, dependency lockfile, test trace, device details, and metric definitions. Compare repeated runs rather than trusting one noisy sample.
Keep tests deterministic
Replay saved telemetry and mock network timing for UI tests. Use hardware-in-the-loop tests for real camera, gateway, inference, and robot paths.
Make failures actionable
Publish slow stage, affected screen, trace ID, and before/after metrics so a failure points toward a cause.
Example implementation
This Dart snippet illustrates one part of the design. Adapt types, transport behavior, timestamp semantics, and platform APIs to your actual system before production use.
class PerformanceBudget {
const PerformanceBudget({
required this.maxP95FrameBuildMs,
required this.maxP95DecodeMs,
required this.maxP95TelemetryAgeMs,
});
final double maxP95FrameBuildMs;
final double maxP95DecodeMs;
final double maxP95TelemetryAgeMs;
}
Performance checklist
- Measure p95/p99 behavior on target hardware, not only a desktop simulator.
- Bound queues and buffers; define what may be coalesced or dropped.
- Keep heavy parsing, image processing, and inference away from the Flutter UI thread.
- Track source timestamps, sequence numbers, stale-data rate, and dropped updates.
- Test network degradation, reconnects, sustained operation, and resource pressure.
- Keep control commands and critical alerts separate from replaceable telemetry.
Useful Links
Website: www.v-modal.com
SDK Flutter: https://github.com/v-modal/vmodal_sdk_flutter
SDK Android: https://github.com/v-modal/vmodal_sdk_android
Discord: https://discord.gg/K72z28KUx
Top comments (0)