IoUringSocketTestPermutation Class — netty Architecture
Architecture documentation for the IoUringSocketTestPermutation class in IoUringSocketTestPermutation.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8["IoUringSocketTestPermutation"] fc01c5d7_4103_b687_04cd_5854ec158eb8["IoUringSocketTestPermutation.java"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|defined in| fc01c5d7_4103_b687_04cd_5854ec158eb8 ee0398ae_61bc_278e_c1b8_e4817710dfb4["IoUringIoHandlerConfig()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| ee0398ae_61bc_278e_c1b8_e4817710dfb4 b57b7240_0800_7856_2e4a_fdb080e7be84["EventLoopGroup()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| b57b7240_0800_7856_2e4a_fdb080e7be84 c1e75e72_1fe9_86bb_68ec_48a6b5ac7da0["socket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| c1e75e72_1fe9_86bb_68ec_48a6b5ac7da0 7467ee49_e8a4_ea57_29ca_b6eb7836ed2f["serverSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| 7467ee49_e8a4_ea57_29ca_b6eb7836ed2f c0d4c4f7_8246_f07a_a7ff_665129ee249d["clientSocketIoUringOnly()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| c0d4c4f7_8246_f07a_a7ff_665129ee249d 9edf18b1_0126_8e3b_3058_75bc5ecb89d1["clientSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| 9edf18b1_0126_8e3b_3058_75bc5ecb89d1 ce51a4c6_28ea_d3dc_c5e9_5c3f2856d742["clientSocketWithFastOpen()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| ce51a4c6_28ea_d3dc_c5e9_5c3f2856d742 f6af51b3_d165_cbb9_b9f0_69f9a7f6be75["domainSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| f6af51b3_d165_cbb9_b9f0_69f9a7f6be75 fe3a2f3c_2ef0_b714_cba4_a4df74fca738["datagram()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| fe3a2f3c_2ef0_b714_cba4_a4df74fca738 d3b2ead9_1731_23b6_c0aa_904830fad2ee["serverDomainSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| d3b2ead9_1731_23b6_c0aa_904830fad2ee 2c663881_dc49_e7b1_5020_c9b786a0f34c["clientDomainSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| 2c663881_dc49_e7b1_5020_c9b786a0f34c f776b7fc_ce38_d2d9_40a8_29577fc027c0["datagramSocket()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| f776b7fc_ce38_d2d9_40a8_29577fc027c0 5b917aeb_8d3f_bec7_0971_df823db53d8c["DomainSocketAddress()"] b9d8589a_7c28_e55d_4254_c7b2d8ffa8b8 -->|method| 5b917aeb_8d3f_bec7_0971_df823db53d8c
Relationship Graph
Source Code
transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringSocketTestPermutation.java lines 43–297
public class IoUringSocketTestPermutation extends SocketTestPermutation {
static final IoUringSocketTestPermutation INSTANCE = new IoUringSocketTestPermutation();
static final short BGID = 0;
static final EventLoopGroup IO_URING_GROUP = newGroup(false);
static final EventLoopGroup IO_URING_INCREMENTAL_GROUP = newGroup(true);
static IoUringIoHandlerConfig buildConfig(boolean incremental) {
IoUringIoHandlerConfig config = new IoUringIoHandlerConfig();
if (IoUring.isRegisterBufferRingSupported()) {
config.setBufferRingConfig(
IoUringBufferRingConfig.builder()
.bufferGroupId(BGID)
.bufferRingSize((short) 16)
.batchSize(8)
.incremental(incremental)
.allocator(new IoUringFixedBufferRingAllocator(1024))
// Ensure we test both variants
.batchAllocation(ThreadLocalRandom.current().nextBoolean())
.build()
);
}
return config;
}
private static EventLoopGroup newGroup(boolean incremental) {
if (!IoUring.isRegisterBufferRingIncSupported() && incremental) {
return null;
}
return new MultiThreadIoEventLoopGroup(
NUM_THREADS, new DefaultThreadFactory(incremental ?
"testsuite-io_uring-group-buffer-ring-incremental" : "testsuite-io_uring-group", true),
IoUringIoHandler.newFactory(buildConfig(incremental)));
}
@Override
public List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> socket() {
List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
combo(serverSocket(), clientSocket());
list.remove(list.size() - 1); // Exclude NIO x NIO test
return list;
}
@Override
public List<BootstrapFactory<ServerBootstrap>> serverSocket() {
List<BootstrapFactory<ServerBootstrap>> toReturn = new ArrayList<BootstrapFactory<ServerBootstrap>>();
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().group(IO_URING_GROUP)
.channel(IoUringServerSocketChannel.class);
}
});
if (IO_URING_INCREMENTAL_GROUP != null) {
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().group(IO_URING_INCREMENTAL_GROUP)
.channel(IoUringServerSocketChannel.class);
}
});
}
if (IoUring.isTcpFastOpenServerSideAvailable()) {
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
ServerBootstrap serverBootstrap = new ServerBootstrap().group(IO_URING_GROUP)
.channel(IoUringServerSocketChannel.class);
serverBootstrap.option(ChannelOption.TCP_FASTOPEN, 5);
return serverBootstrap;
}
});
if (IO_URING_INCREMENTAL_GROUP != null) {
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
ServerBootstrap serverBootstrap = new ServerBootstrap().group(IO_URING_INCREMENTAL_GROUP)
.channel(IoUringServerSocketChannel.class);
Defined In
Source
Frequently Asked Questions
What is the IoUringSocketTestPermutation class?
IoUringSocketTestPermutation is a class in the netty codebase, defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringSocketTestPermutation.java.
Where is IoUringSocketTestPermutation defined?
IoUringSocketTestPermutation is defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringSocketTestPermutation.java at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free