Skip to content

Commit 8fe7a26

Browse files
afrindfacebook-github-bot
authored andcommitted
Add MoQ performance test client
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
1 parent 7dbec47 commit 8fe7a26

5 files changed

Lines changed: 953 additions & 0 deletions

File tree

moxygen/MoQFramer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ bool isValidGroupOrderParam(uint64_t value) {
5959
case folly::to_underlying(moxygen::GroupOrder::NewestFirst):
6060
return true;
6161
default:
62+
XLOG(ERR) << "Invalid group order value=" << value;
6263
return false;
6364
}
6465
return true;

moxygen/moqtest/CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,37 @@ install(
9797
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
9898
)
9999

100+
101+
# moqperf_test_client
102+
add_executable(
103+
moqperf_test_client
104+
MoQPerfTestClient.cpp
105+
MoQPerfTestClientMain.cpp
106+
)
107+
set_target_properties(
108+
moqperf_test_client
109+
PROPERTIES
110+
BUILD_RPATH ${DEPS_LIBRARIES_DIR}
111+
INSTALL_RPATH ${DEPS_LIBRARIES_DIR}
112+
)
113+
target_include_directories(
114+
moqperf_test_client PUBLIC $<BUILD_INTERFACE:${MOXYGEN_FBCODE_ROOT}>
115+
)
116+
target_compile_options(
117+
moqperf_test_client PRIVATE
118+
${_MOXYGEN_COMMON_COMPILE_OPTIONS}
119+
)
120+
target_link_libraries(
121+
moqperf_test_client PUBLIC
122+
moqtest_utils
123+
moxygenwtclient
124+
)
125+
126+
install(
127+
TARGETS moqperf_test_client
128+
EXPORT moxygen-exports
129+
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
130+
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
131+
)
132+
100133
#add_subdirectory(test)

0 commit comments

Comments
 (0)