Skip to content

Commit 00576b7

Browse files
spikehmeta-codesync[bot]
authored andcommitted
StressTest: add --io_prov_buffs_use_dynamic
Summary: Add `--io_prov_buffs_use_dynamic` to the thrift stresstest and map it to `IoUringProvidedBufferRingMode::Dynamic`. Add a fastio stresstest config that enables the option for both the server and client. Also declare `IoUringBufferProvider` in `AsyncIoUringSocket.h`, which is needed to build the stresstest against the buffer-provider selector commit. Reviewed By: jlhe97 Differential Revision: D116735817 fbshipit-source-id: 62ad14d2d0e1a0db5a3382b1f618957070a66bae
1 parent 0aa0618 commit 00576b7

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

third-party/thrift/src/thrift/conformance/stresstest/util/IoUringUtil.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ DEFINE_bool(
5959
io_prov_buffs_use_incremental,
6060
false,
6161
"Enable the use of incremental buffers usage for recv operations. false by default.");
62+
DEFINE_bool(
63+
io_prov_buffs_use_dynamic,
64+
false,
65+
"Use the dynamic io_uring provided buffer ring. Off by default.");
6266
#if FOLLY_HAS_LIBURING
6367

6468
namespace apache::thrift::stress {
@@ -140,6 +144,11 @@ void setIoUringCommonOptionsFromFlags(folly::IoUringOptions& options) {
140144
if (FLAGS_io_prov_buffs_use_incremental) {
141145
options.setEnableIncrementalBuffers(true);
142146
}
147+
148+
if (FLAGS_io_prov_buffs_use_dynamic) {
149+
options.setProvidedBufferRingMode(
150+
folly::IoUringOptions::ProvidedBufferRingMode::Dynamic);
151+
}
143152
}
144153

145154
folly::IoUringBackend::Options getIoUringOptions() {

0 commit comments

Comments
 (0)