Skip to content

Add memory leak performance test with Perfetto tracing - #150

Open
RameshDPrasad wants to merge 4 commits into
developfrom
memory-leak-test
Open

Add memory leak performance test with Perfetto tracing#150
RameshDPrasad wants to merge 4 commits into
developfrom
memory-leak-test

Conversation

@RameshDPrasad

@RameshDPrasad RameshDPrasad commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an integration test that cycles player create/load/play/destroy to detect native memory leaks
  • Includes Perfetto trace collection config and automated analysis via Python trace_processor
  • Shell script orchestrates the full workflow: run test, collect trace, analyze results
  • Updated to use non-deprecated player API (muted, autoplay, source, currentTime)
  • Show currentLatency for TheoLive sources

Files

  • example/integration_test/memory_leak_test.dart — Flutter integration test (HYBRID_COMPOSITION + SURFACE_TEXTURE)
  • scripts/run_memory_test.sh — Orchestration script
  • scripts/analyze_memory_trace.py — Perfetto trace analysis
  • scripts/perfetto_memory_config.textproto — Perfetto config
  • performance_test.md — Documentation

Test plan

  • Run dart analyze — passes (only avoid_print info notices, expected for test logging)
  • Run flutter test — unit tests pass
  • Run memory leak test on Android device via scripts/run_memory_test.sh

🤖 Generated with Claude Code

RameshDPrasad and others added 2 commits March 31, 2026 15:56
Introduces an integration test that cycles player create/load/play/destroy
to detect native memory leaks, with Perfetto trace collection and automated
analysis via Python trace_processor.

Updated to use non-deprecated player API (muted, autoplay, source, currentTime).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switches from cdn.theoplayer.com HLS stream to TheoLive source
to match the pattern used in other integration tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant