8000 P2PMatchingReport: rollback timing fields, logged by LBS by inada-s-ai[bot] · Pull Request #438 · inada-s/gdxsv · GitHub
[go: up one dir, main page]

Skip to content

P2PMatchingReport: rollback timing fields, logged by LBS - #438

Merged
inada-s merged 1 commit into
masterfrom
ai/p2p-report-timing
Oct 24, 2026
Merged

inada-s merged 1 commit into
masterfrom
ai/p2p-report-timing

Conversation

@inada-s-ai
@inada-s-ai inada-s-ai Bot commented Oct 24, 2026
Copy link
Copy Markdown
Contributor

For inada-s/flycast#573 (step 2): more fields in P2PMatchingReport, so the field can show why a match lags.

  • gdxsv.proto: new fields 21–39 on P2PMatchingReport, plus the messages TimingStats, RemotePeerReport and RenderSettings. Only new field numbers, so old clients and old servers still work.
    • Input delay; render settings (TR, vsync, renderer).
    • Socket read gap; rollback count, depth histogram and longest rollback.
    • Late frames (over 1 / 1.5 / 2 periods) and dropped frames.
    • Per remote peer: loss, ping min/median/max, route (direct / via a peer / via a server); relay packets forwarded.
    • Timesync frames.
    • Input read, input send and Present intervals (mean, min, p1/p5/p99, max, share outside ±2 ms).
    • Rollback budget (Present → end of the next limiter sleep), frames with no budget left, and the rollback depth in those frames.
  • lbs_handler.go: both log branches share one field list (p2pMatchingReportFields) and log the new fields under their proto names. A message an older client does not send is left out of the log.
  • gdxsv.pb.go was regenerated with protoc 3.13.0 + protoc-gen-go v1.26.0. With the old proto, this pair reproduces the committed gdxsv.pb.go and flycast's gdxsv.pb.cc/.h byte for byte.
  • The flycast side (filling the fields + the regenerated C++) is a separate PR, next.

Verified (windows-mini, MinGW Go):

  • go test -race ./... passes.
  • New Test_p2pMatchingReportFields: a report goes through marshal/unmarshal, and the log fields are read back with a zap observer. As a check, I renamed one log key; the test failed (expected 7, got nil).

Not run: CI, and a real client sending these fields (the flycast PR comes later).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <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

0