setupTrial() — netty Function Reference
Architecture documentation for the setupTrial() function in NoPriorityByteDistributionBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c3443fcf_5e0f_eff9_15eb_9c1d317d4307["setupTrial()"] f30bf97b_8baf_7546_403d_6c90acdabe12["NoPriorityByteDistributionBenchmark"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|defined in| f30bf97b_8baf_7546_403d_6c90acdabe12 af9824ac_7220_18ff_1137_1c1d2a831cfe["ByteCounter()"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|calls| af9824ac_7220_18ff_1137_1c1d2a831cfe 82a6504f_ecef_4aa7_b7a3_beb1a429e3ce["toStreamId()"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|calls| 82a6504f_ecef_4aa7_b7a3_beb1a429e3ce a7eb557c_1242_3959_11ef_d3cf6e5dcbac["addData()"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|calls| a7eb557c_1242_3959_11ef_d3cf6e5dcbac f5519e43_c21a_6a69_1a19_795af45af4fd["DataRefresher()"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|calls| f5519e43_c21a_6a69_1a19_795af45af4fd style c3443fcf_5e0f_eff9_15eb_9c1d317d4307 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java lines 118–154
@Setup(Level.Trial)
public void setupTrial() throws Exception {
connection = new DefaultHttp2Connection(false);
dataRefresherKey = connection.newKey();
// Create the flow controller
switch (algorithm) {
case WFQ:
distributor = new WeightedFairQueueByteDistributor(connection, 0);
break;
case UNIFORM:
distributor = new UniformStreamByteDistributor(connection);
break;
}
controller = new DefaultHttp2RemoteFlowController(connection, new ByteCounter(distributor));
connection.remote().flowController(controller);
Http2ConnectionHandler handler = new Http2ConnectionHandlerBuilder()
.encoderEnforceMaxConcurrentStreams(false).validateHeaders(false)
.frameListener(new Http2FrameAdapter())
.connection(connection)
.build();
ctx = new EmbeddedChannelWriteReleaseHandlerContext(PooledByteBufAllocator.DEFAULT, handler) {
@Override
protected void handleException(Throwable t) {
handleUnexpectedException(t);
}
};
handler.handlerAdded(ctx);
handler.channelActive(ctx);
// Create the streams, each initialized with MAX_INT bytes.
for (int i = 0; i < numStreams; ++i) {
Http2Stream stream = connection.local().createStream(toStreamId(i), false);
addData(stream, Integer.MAX_VALUE);
stream.setProperty(dataRefresherKey, new DataRefresher(stream));
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does setupTrial() do?
setupTrial() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java.
Where is setupTrial() defined?
setupTrial() is defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java at line 118.
What does setupTrial() call?
setupTrial() calls 4 function(s): ByteCounter, DataRefresher, addData, toStreamId.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free