jfrBufferAllocation() — netty Function Reference
Architecture documentation for the jfrBufferAllocation() function in AdaptiveByteBufAllocatorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD aa2d00a0_08fb_4254_a909_8d9e0e915b76["jfrBufferAllocation()"] b5780ec9_74a4_594b_4225_0099765d71e7["AdaptiveByteBufAllocatorTest"] aa2d00a0_08fb_4254_a909_8d9e0e915b76 -->|defined in| b5780ec9_74a4_594b_4225_0099765d71e7 f95f6269_707a_cb2d_e5c5_1293cb0ec01f["AdaptiveByteBufAllocator()"] aa2d00a0_08fb_4254_a909_8d9e0e915b76 -->|calls| f95f6269_707a_cb2d_e5c5_1293cb0ec01f style aa2d00a0_08fb_4254_a909_8d9e0e915b76 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java lines 315–347
@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();
AdaptiveByteBufAllocator alloc = new AdaptiveByteBufAllocator(true, false);
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/AdaptiveByteBufAllocatorTest.java.
Where is jfrBufferAllocation() defined?
jfrBufferAllocation() is defined in buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java at line 315.
What does jfrBufferAllocation() call?
jfrBufferAllocation() calls 1 function(s): AdaptiveByteBufAllocator.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free