Home / Function/ setUp() — netty Function Reference

setUp() — netty Function Reference

Architecture documentation for the setUp() function in WebSocketFrame08DecoderBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  dbf4ac99_cdc8_2094_a43c_8ee92c1057c4["setUp()"]
  bfa1b719_ab80_30c9_4f60_3e835ea3ba3e["WebSocketFrame08DecoderBenchmark"]
  dbf4ac99_cdc8_2094_a43c_8ee92c1057c4 -->|defined in| bfa1b719_ab80_30c9_4f60_3e835ea3ba3e
  style dbf4ac99_cdc8_2094_a43c_8ee92c1057c4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbench/websocket/WebSocketFrame08DecoderBenchmark.java lines 67–86

    @Setup(Level.Trial)
    public void setUp() {
        byte[] bytes = new byte[contentLength];
        ThreadLocalRandom.current().nextBytes(bytes);
        ByteBufAllocator allocator = pooledAllocator? PooledByteBufAllocator.DEFAULT : UnpooledByteBufAllocator.DEFAULT;
        ByteBuf testContent = allocator.buffer(contentLength).writeBytes(bytes);

        EmbeddedChannel channel = new EmbeddedChannel(new WebSocket08FrameEncoder(masking));
        channel.writeOutbound(new BinaryWebSocketFrame(testContent));
        websocketFrame = Unpooled.unreleasableBuffer(((ByteBuf) channel.readOutbound()).asReadOnly());
        channel.pipeline().remove(WebSocket08FrameEncoder.class);

        websocketDecoder = new WebSocket08FrameDecoder(masking, false, 65536);
        context = new EmbeddedChannelHandlerContext(allocator, websocketDecoder, channel) {
            @Override
            protected void handleException(Throwable t) {
                handleUnexpectedException(t);
            }
        };
    }

Domain

Subdomains

Frequently Asked Questions

What does setUp() do?
setUp() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/websocket/WebSocketFrame08DecoderBenchmark.java.
Where is setUp() defined?
setUp() is defined in microbench/src/main/java/io/netty/microbench/websocket/WebSocketFrame08DecoderBenchmark.java at line 67.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free