CountingWriter Class — netty Architecture
Architecture documentation for the CountingWriter class in NoPriorityByteDistributionBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b35c8769_b4a5_98d3_cef5_77dd9b4e5869["CountingWriter"] 279fab0c_16a0_85c7_c9ea_cb95941ef43a["NoPriorityByteDistributionBenchmark.java"] b35c8769_b4a5_98d3_cef5_77dd9b4e5869 -->|defined in| 279fab0c_16a0_85c7_c9ea_cb95941ef43a f29f4c46_bdc6_7166_2996_94d0d038e47c["CountingWriter()"] b35c8769_b4a5_98d3_cef5_77dd9b4e5869 -->|method| f29f4c46_bdc6_7166_2996_94d0d038e47c d3c15c2b_89df_c6f8_2627_eddb52f353a8["write()"] b35c8769_b4a5_98d3_cef5_77dd9b4e5869 -->|method| d3c15c2b_89df_c6f8_2627_eddb52f353a8
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java lines 267–294
private final class CountingWriter implements Writer {
private final Writer delegate;
private CountingWriter(Writer delegate) {
this.delegate = delegate;
}
@Override
public void write(Http2Stream stream, int numBytes) {
if (numBytes > 0) {
// Add the data to the refresher so that it can be given back to the
// stream at the end of the iteration.
DataRefresher refresher = dataRefresher(stream);
refresher.add(numBytes);
++counters.numWrites;
counters.totalBytes += numBytes;
if (numBytes < counters.minWriteSize) {
counters.minWriteSize = numBytes;
}
if (numBytes > counters.maxWriteSize) {
counters.maxWriteSize = numBytes;
}
}
delegate.write(stream, numBytes);
}
}
Defined In
Source
Frequently Asked Questions
What is the CountingWriter class?
CountingWriter is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java.
Where is CountingWriter defined?
CountingWriter is defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java at line 267.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free