setup() — netty Function Reference
Architecture documentation for the setup() function in StompEncoderBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 714f5115_9e41_3fac_298a_669ac690c883["setup()"] 86cc379c_ed38_013b_cfa3_8c8e137ac012["StompEncoderBenchmark"] 714f5115_9e41_3fac_298a_669ac690c883 -->|defined in| 86cc379c_ed38_013b_cfa3_8c8e137ac012 style 714f5115_9e41_3fac_298a_669ac690c883 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/stomp/StompEncoderBenchmark.java lines 70–89
@Setup(Level.Trial)
public void setup() {
byte[] bytes = new byte[contentLength];
ThreadLocalRandom.current().nextBytes(bytes);
content = Unpooled.wrappedBuffer(bytes);
ByteBuf testContent = Unpooled.unreleasableBuffer(content.asReadOnly());
StompHeadersSubframe headersSubframe = ExampleStompHeadersSubframe.EXAMPLES.get(headersType);
stompFrame = new DefaultStompFrame(headersSubframe.command(), testContent);
stompFrame.headers().setAll(headersSubframe.headers());
stompEncoder = new StompSubframeEncoder();
context = new EmbeddedChannelWriteReleaseHandlerContext(
pooledAllocator? PooledByteBufAllocator.DEFAULT : UnpooledByteBufAllocator.DEFAULT, stompEncoder) {
@Override
protected void handleException(Throwable t) {
handleUnexpectedException(t);
}
};
}
Domain
Subdomains
Source
Frequently Asked Questions
What does setup() do?
setup() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/stomp/StompEncoderBenchmark.java.
Where is setup() defined?
setup() is defined in microbench/src/main/java/io/netty/microbench/stomp/StompEncoderBenchmark.java at line 70.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free