1.6 KiB
1.6 KiB
Phase 6 Benchmark 方法
执行
python3 benchmark/runner/run_emulator.py startup_local --repeat 20
python3 benchmark/runner/run_emulator.py seek_local --repeat 50
python3 benchmark/runner/run_emulator.py stress_lifecycle --repeat 100
python3 benchmark/runner/run_emulator.py play_pause --repeat 200
runner 通过 hdc/uitest 驱动 Playback Lab,每次 load 使用内置 sample.mp4,记录 timeline、错误、状态和进程采样。startup 的首轮标为 cold-ish,后续为 warm;OS page cache 未被强制清空。seek 使用加载后立即触发的原生 +10s,避免短样片在输入框多次 keyEvent 期间自然结束。
每个场景输出逐次 JSON 和 min/max/avg/median/P90/P95。百分位采用排序后的 nearest-rank;负时间线值是 unavailable,不参与统计。错误单独保留,不从成功样本中删除。
采样边界
- VmRSS、VmSize、Threads、fd count 和原始 CPU jiffies 来自
/proc;PSS、精确 native heap、可靠 CPU permille 未被模拟器公开,输出 null/原始值。 - host wall time 包含 hdc 往返,只用于发现自动化超时,不作为启动性能结论。
firstAudioCallbackMs是 Playback Lab 诊断轮询观察到 callback_count>0 的时间;要取得 callback 内精确时间需独立 tracing,因此不把它当作硬件时钟证据。stress_lifecycle覆盖 load/stop;release/recreate 需要新 XComponent surface,另行作为实体设备/手工场景。- HTTPS、HLS、鉴权、网络字幕必须使用受控 fixture;本轮没有把公网失败当作性能数据。