BufStats Class — netty Architecture
Architecture documentation for the BufStats class in ByteBufAllocateAndGrowBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 86ab0092_1cfb_8a37_914c_6b94750fabe3["BufStats"] d7307643_9e24_b21a_6fec_940adfa7d66b["ByteBufAllocateAndGrowBenchmark.java"] 86ab0092_1cfb_8a37_914c_6b94750fabe3 -->|defined in| d7307643_9e24_b21a_6fec_940adfa7d66b eb99c839_e151_4c32_1742_7f6391dfee24["record()"] 86ab0092_1cfb_8a37_914c_6b94750fabe3 -->|method| eb99c839_e151_4c32_1742_7f6391dfee24 f41a2a8a_2738_3fe2_5b33_3a3261f460bc["avgSize()"] 86ab0092_1cfb_8a37_914c_6b94750fabe3 -->|method| f41a2a8a_2738_3fe2_5b33_3a3261f460bc 3b76d38d_3648_a524_751d_15fc2a72723f["avgFastCap()"] 86ab0092_1cfb_8a37_914c_6b94750fabe3 -->|method| 3b76d38d_3648_a524_751d_15fc2a72723f
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java lines 104–124
@State(Scope.Thread)
@AuxCounters
public static class BufStats {
long bufCounts;
long bufSizeSum;
long bufFastCapSum;
void record(ByteBuf byteBuf) {
bufCounts++;
bufSizeSum += byteBuf.capacity();
bufFastCapSum += byteBuf.maxFastWritableBytes();
}
public double avgSize() {
return bufSizeSum / (double) bufCounts;
}
public double avgFastCap() {
return bufFastCapSum / (double) bufCounts;
}
}
Source
Frequently Asked Questions
What is the BufStats class?
BufStats is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java.
Where is BufStats defined?
BufStats is defined in microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java at line 104.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free