test(sfu): add SFU capacity load test and client instrumentation

HA
2mo ago
+990-7

Summary by cubic

Adds an SFU capacity load test that drives a real media session and measures join and first-frame latency as viewers are added in batches. Results show latency and failures climbing past ~65 concurrent viewers.

Test setup and instrumentation

  • The Puppeteer script logs in, starts a broadcaster, then adds viewers in batches of 5 up to 100, writing P50/P99 latencies and failure counts to load-test/sfu-capacity-results.csv.
  • Broadcaster and viewer pages expose __csRoomId, __csLiveAt, __csJoinedAt, and __csFirstFrameAt on window so the test can time room creation, join, and first frame.
  • /broadcaster, /viewer, and /dashboard are no longer wrapped in ProtectedRoute, so they load without authentication in every environment.
  • Broadcaster connects its socket on mount and disconnects on unmount; ViewerPage switched from getSocket to connectSocket.
  • Backend now logs the socket disconnect reason and details at error level instead of info level.