HttpRequestResponseBenchmark Class — netty Architecture
Architecture documentation for the HttpRequestResponseBenchmark class in HttpRequestResponseBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD cfb3f48f_3b42_7cd0_4f15_90945e3896fe["HttpRequestResponseBenchmark"] c0f7ef6d_b666_8405_5cb9_2920f68ad32e["HttpRequestResponseBenchmark.java"] cfb3f48f_3b42_7cd0_4f15_90945e3896fe -->|defined in| c0f7ef6d_b666_8405_5cb9_2920f68ad32e a3ee551c_6f33_2720_76a9_71f1d4b84646["setup()"] cfb3f48f_3b42_7cd0_4f15_90945e3896fe -->|method| a3ee551c_6f33_2720_76a9_71f1d4b84646 04087d0e_6fc9_5a4c_5ec7_159b980ba935["Object()"] cfb3f48f_3b42_7cd0_4f15_90945e3896fe -->|method| 04087d0e_6fc9_5a4c_5ec7_159b980ba935
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http/HttpRequestResponseBenchmark.java lines 57–274
@State(Scope.Thread)
@Warmup(iterations = 10, time = 1)
@Measurement(iterations = 10, time = 1)
public class HttpRequestResponseBenchmark extends AbstractMicrobenchmark {
ByteBuf GET;
int readerIndex;
int writeIndex;
EmbeddedChannel nettyChannel;
@Param({ "true", "false" })
boolean websocket;
static class Alloc implements ByteBufAllocator {
private final ByteBuf buf = Unpooled.buffer();
private final int capacity = buf.capacity();
@Override
public ByteBuf buffer() {
buf.clear();
return buf;
}
@Override
public ByteBuf buffer(int initialCapacity) {
if (initialCapacity <= capacity) {
return buffer();
} else {
throw new IllegalArgumentException();
}
}
@Override
public ByteBuf buffer(int initialCapacity, int maxCapacity) {
if (initialCapacity <= capacity) {
return buffer();
} else {
throw new IllegalArgumentException();
}
}
@Override
public ByteBuf ioBuffer() {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf ioBuffer(int initialCapacity) {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf ioBuffer(int initialCapacity, int maxCapacity) {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf heapBuffer() {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf heapBuffer(int initialCapacity) {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf heapBuffer(int initialCapacity, int maxCapacity) {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf directBuffer() {
throw new UnsupportedOperationException();
}
@Override
public ByteBuf directBuffer(int initialCapacity) {
throw new UnsupportedOperationException();
}
Source
Frequently Asked Questions
What is the HttpRequestResponseBenchmark class?
HttpRequestResponseBenchmark is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http/HttpRequestResponseBenchmark.java.
Where is HttpRequestResponseBenchmark defined?
HttpRequestResponseBenchmark is defined in microbench/src/main/java/io/netty/microbench/http/HttpRequestResponseBenchmark.java at line 57.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free