setup() — netty Function Reference
Architecture documentation for the setup() function in SnappyDirectBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 57eafa5d_01b9_5baf_dae0_263a7cd65561["setup()"] 7ad1569d_0704_7b12_e97c_432fbce0c6c9["SnappyDirectBenchmark"] 57eafa5d_01b9_5baf_dae0_263a7cd65561 -->|defined in| 7ad1569d_0704_7b12_e97c_432fbce0c6c9 style 57eafa5d_01b9_5baf_dae0_263a7cd65561 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/snappy/SnappyDirectBenchmark.java lines 70–87
@Setup
public void setup() throws UnsupportedEncodingException {
ByteBufAllocator allocator = UnpooledByteBufAllocator.DEFAULT;
buffer = allocator.buffer(bufferSizeInBytes);
if (reuseHashTable) {
snappy = Snappy.withHashTableReuse();
} else {
snappy = new Snappy();
}
byte[] compressibleByteArray = new byte[buffer.writableBytes()];
Arrays.fill(compressibleByteArray, (byte) 1);
buffer.writeBytes(compressibleByteArray);
in = Unpooled.wrappedBuffer(compressibleByteArray);
out = Unpooled.directBuffer();
}
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/snappy/SnappyDirectBenchmark.java.
Where is setup() defined?
setup() is defined in microbench/src/main/java/io/netty/microbench/snappy/SnappyDirectBenchmark.java at line 70.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free