readBatch() — netty Function Reference
Architecture documentation for the readBatch() function in ByteBufAccessBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a1442562_fede_9287_f6dc_930b3ab7433b["readBatch()"] bbe8e86b_057f_5aa0_71ed_6d8276f6f6f8["ByteBufAccessBenchmark"] a1442562_fede_9287_f6dc_930b3ab7433b -->|defined in| bbe8e86b_057f_5aa0_71ed_6d8276f6f6f8 61df950d_7e92_6b20_f940_a350a421c201["readByte()"] a1442562_fede_9287_f6dc_930b3ab7433b -->|calls| 61df950d_7e92_6b20_f940_a350a421c201 style a1442562_fede_9287_f6dc_930b3ab7433b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java lines 192–208
@Benchmark
public int readBatch() {
buffer.readerIndex(0);
int result = 0;
// WARNING!
// Please do not replace this sum loop with a BlackHole::consume loop:
// BlackHole::consume could prevent the JVM to perform certain optimizations
// forcing ByteBuf::readByte to be executed in order.
// The purpose of the benchmark is to mimic accesses on ByteBuf
// as in a real (single-threaded) case ie without (compiler) memory barriers that would
// disable certain optimizations or would make bounds checks (if enabled)
// to happen on each access.
for (int i = 0, size = batchSize; i < size; i++) {
result += buffer.readByte();
}
return result;
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does readBatch() do?
readBatch() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java.
Where is readBatch() defined?
readBatch() is defined in microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java at line 192.
What does readBatch() call?
readBatch() calls 1 function(s): readByte.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free