jfrBufferAllocation() — netty Function Reference
Architecture documentation for the jfrBufferAllocation() function in PooledByteBufAllocatorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e373ef15_6f55_d902_f43b_d3f2fe46c6b7["jfrBufferAllocation()"] f8855572_2abf_1bf6_a32b_5cf6d1cf4947["PooledByteBufAllocatorTest"] e373ef15_6f55_d902_f43b_d3f2fe46c6b7 -->|defined in| f8855572_2abf_1bf6_a32b_5cf6d1cf4947 style e373ef15_6f55_d902_f43b_d3f2fe46c6b7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java lines 1087–1119
@SuppressWarnings("Since15")
@Test
@EnabledForJreRange(min = JRE.JAVA_17) // RecordingStream
@Timeout(10)
public void jfrBufferAllocation() throws Exception {
try (RecordingStream stream = new RecordingStream()) {
CompletableFuture<RecordedEvent> allocateFuture = new CompletableFuture<>();
CompletableFuture<RecordedEvent> releaseFuture = new CompletableFuture<>();
stream.enable(AllocateBufferEvent.class);
stream.onEvent(AllocateBufferEvent.NAME, allocateFuture::complete);
stream.enable(FreeBufferEvent.class);
stream.onEvent(FreeBufferEvent.NAME, releaseFuture::complete);
stream.startAsync();
PooledByteBufAllocator alloc = newAllocator(true);
alloc.directBuffer(128).release();
RecordedEvent allocate = allocateFuture.get();
assertEquals(128, allocate.getInt("size"));
assertEquals(128, allocate.getInt("maxFastCapacity"));
assertEquals(Integer.MAX_VALUE, allocate.getInt("maxCapacity"));
assertTrue(allocate.getBoolean("chunkPooled"));
assertFalse(allocate.getBoolean("chunkThreadLocal"));
assertTrue(allocate.getBoolean("direct"));
RecordedEvent release = releaseFuture.get();
assertEquals(128, release.getInt("size"));
assertEquals(128, release.getInt("maxFastCapacity"));
assertEquals(Integer.MAX_VALUE, release.getInt("maxCapacity"));
assertTrue(release.getBoolean("direct"));
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does jfrBufferAllocation() do?
jfrBufferAllocation() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java.
Where is jfrBufferAllocation() defined?
jfrBufferAllocation() is defined in buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java at line 1087.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free