Skip to content

Add MoQ performance test client - #91

Closed
afrind wants to merge 1 commit into
facebookexperimental:mainfrom
afrind:export-D86928590
Closed

Add MoQ performance test client#91
afrind wants to merge 1 commit into
facebookexperimental:mainfrom
afrind:export-D86928590

Conversation

@afrind

@afrind afrind commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Summary:
This adds a performance test client for MoQ/moxygen that helps determine the maximum number of subscribers that can subscribe to a given track at the relay before it affects latency.

Features:

  • Takes relay URL, quic_transport boolean, target_subscribers, and duration flags
  • Uses moq-test scheme with configurable parameters:
    • one-stream-per-group (ForwardingPreference::ONE_SUBGROUP_PER_GROUP)
    • object_interval: 33ms
    • I-frame size: 7,576 bytes
    • P-frame size: 1,894 bytes
    • 30 objects per group (1 group per second)
    • end group of 60
    • DELIVERY_TIMEOUT parameter: 10ms
  • Gradually adds subscribers over 10 seconds to reach target_subscribers
  • Each subscriber uses its own QUIC or WebTransport connection
  • All subscribers run on a single event base
  • Reports statistics every 1 second (subscriber count, objects/s, bytes/s)
  • Automatically terminates if any subscriber detects a stream reset
  • Prints comprehensive test summary at the end

Implementation:

  • MoQPerfTestClient: Main test orchestrator managing multiple subscribers
  • SubscriberState: Tracks state and statistics for each individual subscriber
  • Uses evb_->timer() for scheduling periodic tasks
  • Uses loop() instead of loopForever() - event loop stops when all work completes
  • Calls drain() after subscribe so client exits when publisher ends

Generated by Confucius Code Assist (CCA)
Session, Trace

Differential Revision: D86928590

@meta-codesync

meta-codesync Bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

@afrind has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86928590.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 6, 2026
Summary:

This adds a performance test client for MoQ/moxygen that helps determine the maximum number of subscribers that can subscribe to a given track at the relay before it affects latency.

**Features:**
- Takes relay URL, quic_transport boolean, target_subscribers, and duration flags
- Uses moq-test scheme with configurable parameters:
  - one-stream-per-group (ForwardingPreference::ONE_SUBGROUP_PER_GROUP)
  - object_interval: 33ms
  - I-frame size: 7,576 bytes
  - P-frame size: 1,894 bytes
  - 30 objects per group (1 group per second)
  - end group of 60
  - DELIVERY_TIMEOUT parameter: 10ms
- Gradually adds subscribers over 10 seconds to reach target_subscribers
- Each subscriber uses its own QUIC or WebTransport connection
- All subscribers run on a single event base
- Reports statistics every 1 second (subscriber count, objects/s, bytes/s)
- Automatically terminates if any subscriber detects a stream reset
- Prints comprehensive test summary at the end

**Implementation:**
- `MoQPerfTestClient`: Main test orchestrator managing multiple subscribers
- `SubscriberState`: Tracks state and statistics for each individual subscriber
- Uses `evb_->timer()` for scheduling periodic tasks
- Uses `loop()` instead of `loopForever()` - event loop stops when all work completes
- Calls `drain()` after subscribe so client exits when publisher ends

---
> Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=a39574cc-c037-11f0-98c5-1bf0a87c8091&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=a39574cc-c037-11f0-98c5-1bf0a87c8091&tab=Trace)

Differential Revision: D86928590
@meta-codesync

meta-codesync Bot commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 02eb90a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants