stepsBuffers() — netty Function Reference
Architecture documentation for the stepsBuffers() function in HttpFragmentedRequestDecoderBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 78e383d1_ec0a_81bd_52af_86e8d6e21a98["stepsBuffers()"] ac596852_f546_4717_f225_2e73d54a1d6f["HttpFragmentedRequestDecoderBenchmark"] 78e383d1_ec0a_81bd_52af_86e8d6e21a98 -->|defined in| ac596852_f546_4717_f225_2e73d54a1d6f 71201cc8_be9c_a8b4_1dfd_a7b4768be458["initPipeline()"] 71201cc8_be9c_a8b4_1dfd_a7b4768be458 -->|calls| 78e383d1_ec0a_81bd_52af_86e8d6e21a98 style 78e383d1_ec0a_81bd_52af_86e8d6e21a98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http/HttpFragmentedRequestDecoderBenchmark.java lines 71–93
private static ByteBuf[] stepsBuffers(ByteBufAllocator alloc, byte[] content, int fragmentSize, boolean direct) {
// allocate a single big buffer and just slice it
final int headerLength = content.length - CONTENT_LENGTH;
final ArrayList<ByteBuf> bufs = new ArrayList<ByteBuf>();
for (int a = 0; a < headerLength;) {
int amount = fragmentSize;
if (a + amount > headerLength) {
amount = headerLength - a;
}
final ByteBuf buf = direct? alloc.directBuffer(amount, amount) : alloc.heapBuffer(amount, amount);
buf.writeBytes(content, a, amount);
bufs.add(buf);
a += amount;
}
// don't split the content
// Should produce HttpContent
final ByteBuf buf = direct?
alloc.directBuffer(CONTENT_LENGTH, CONTENT_LENGTH) :
alloc.heapBuffer(CONTENT_LENGTH, CONTENT_LENGTH);
buf.writeBytes(content, content.length - CONTENT_LENGTH, CONTENT_LENGTH);
bufs.add(buf);
return bufs.toArray(new ByteBuf[0]);
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does stepsBuffers() do?
stepsBuffers() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http/HttpFragmentedRequestDecoderBenchmark.java.
Where is stepsBuffers() defined?
stepsBuffers() is defined in microbench/src/main/java/io/netty/microbench/http/HttpFragmentedRequestDecoderBenchmark.java at line 71.
What calls stepsBuffers()?
stepsBuffers() is called by 1 function(s): initPipeline.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free