Skip to content

fix(stats): use rolling host latency for live overlay - #59

Merged
qiin2333 merged 1 commit into
masterfrom
codex/fix-live-host-latency-stats
Jul 16, 2026
Merged

fix(stats): use rolling host latency for live overlay#59
qiin2333 merged 1 commit into
masterfrom
codex/fix-live-host-latency-stats

Conversation

@qiin2333

Copy link
Copy Markdown
Contributor

改了啥喵

  • 增加最近 1 秒主机处理延迟窗口统计。
  • 性能浮层的 hostLatency 改为实时窗口平均值。
  • 保留累计主机延迟总量和帧数,串流结束报告继续使用全局平均值。

为啥要改

之前客户端把整个会话的累计平均主机延迟直接显示在实时浮层里。一次网络或编码抖动留下的高延迟样本会一直拖住后续数值,看起来就像主机延迟持续上升,杂鱼统计把历史包袱背太久了。

验证

  • npm run test:sunshine-mock
  • git diff --check
  • HarmonyOS assembleHap 未执行成功:本机缺少 DevEco/Hvigor,脚本尝试从 npm 获取不存在的 hvigor 包。

关联 issue:#57

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@qiin2333, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 58462e9e-0e28-4c56-b8b6-f13880bd0c25

📥 Commits

Reviewing files that changed from the base of the PR and between e1a6c99 and d2e3e31.

📒 Files selected for processing (4)
  • entry/src/main/ets/service/streaming/StreamingSession.ets
  • nativelib/src/main/cpp/moonlight_bridge.cpp
  • nativelib/src/main/cpp/video_decoder.cpp
  • nativelib/src/main/cpp/video_decoder.h
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-live-host-latency-stats

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiin2333
qiin2333 marked this pull request as ready for review July 16, 2026 08:03
@qiin2333
qiin2333 merged commit a30f69f into master Jul 16, 2026
2 checks passed
@qiin2333
qiin2333 deleted the codex/fix-live-host-latency-stats branch July 16, 2026 11:18
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