NoPriorityByteDistributionBenchmark Class — netty Architecture
Architecture documentation for the NoPriorityByteDistributionBenchmark class in NoPriorityByteDistributionBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f30bf97b_8baf_7546_403d_6c90acdabe12["NoPriorityByteDistributionBenchmark"] 279fab0c_16a0_85c7_c9ea_cb95941ef43a["NoPriorityByteDistributionBenchmark.java"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|defined in| 279fab0c_16a0_85c7_c9ea_cb95941ef43a d49edc4c_cec7_f20c_9f88_4199cc48809c["NoPriorityByteDistributionBenchmark()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| d49edc4c_cec7_f20c_9f88_4199cc48809c 9362a3ca_f3b0_90e7_8a30_55f9f55aa3fb["tearDownTrial()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| 9362a3ca_f3b0_90e7_8a30_55f9f55aa3fb c3443fcf_5e0f_eff9_15eb_9c1d317d4307["setupTrial()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| c3443fcf_5e0f_eff9_15eb_9c1d317d4307 6891fce2_272e_e7a0_e498_e48c7a7bc3b8["setupInvocation()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| 6891fce2_272e_e7a0_e498_e48c7a7bc3b8 3df43039_e242_a821_b58b_3c86357eff75["write()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| 3df43039_e242_a821_b58b_3c86357eff75 35d08af3_bfdd_7560_e6ef_22b949e65de1["resetWindow()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| 35d08af3_bfdd_7560_e6ef_22b949e65de1 fdacfdd4_5063_2c2c_5927_b3a56cc79232["DataRefresher()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| fdacfdd4_5063_2c2c_5927_b3a56cc79232 a7eb557c_1242_3959_11ef_d3cf6e5dcbac["addData()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| a7eb557c_1242_3959_11ef_d3cf6e5dcbac 82a6504f_ecef_4aa7_b7a3_beb1a429e3ce["toStreamId()"] f30bf97b_8baf_7546_403d_6c90acdabe12 -->|method| 82a6504f_ecef_4aa7_b7a3_beb1a429e3ce
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java lines 48–296
@Threads(1)
@State(Scope.Benchmark)
public class NoPriorityByteDistributionBenchmark extends AbstractMicrobenchmark {
public enum Algorithm {
WFQ,
UNIFORM
}
@Param({ "100", "10000" })
private int numStreams;
@Param({ "1024", "65536", "1048576" })
private int windowSize;
@Param
private Algorithm algorithm;
private Http2Connection connection;
private Http2Connection.PropertyKey dataRefresherKey;
private Http2RemoteFlowController controller;
private StreamByteDistributor distributor;
private AdditionalCounters counters;
private ChannelHandlerContext ctx;
public NoPriorityByteDistributionBenchmark() {
super(true);
}
/**
* Additional counters for a single iteration.
*/
@AuxCounters
@State(Scope.Thread)
public static class AdditionalCounters {
int minWriteSize = Integer.MAX_VALUE;
int maxWriteSize = Integer.MIN_VALUE;
long totalBytes;
long numWrites;
int invocations;
public int minWriteSize() {
return minWriteSize;
}
public int avgWriteSize() {
return (int) (totalBytes / numWrites);
}
public int maxWriteSize() {
return maxWriteSize;
}
}
private final Http2StreamVisitor invocationVisitor = new Http2StreamVisitor() {
@Override
public boolean visit(Http2Stream stream) throws Http2Exception {
// Restore the connection window.
resetWindow(stream);
// Restore the data to each stream.
dataRefresher(stream).refreshData();
return true;
}
};
@TearDown(Level.Trial)
public void tearDownTrial() throws Exception {
ctx.close();
}
@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:
Defined In
Source
Frequently Asked Questions
What is the NoPriorityByteDistributionBenchmark class?
NoPriorityByteDistributionBenchmark is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java.
Where is NoPriorityByteDistributionBenchmark defined?
NoPriorityByteDistributionBenchmark is defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java at line 48.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free