Home / Function/ jfrChunkAllocation() — netty Function Reference

jfrChunkAllocation() — netty Function Reference

Architecture documentation for the jfrChunkAllocation() function in AdaptiveByteBufAllocatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b68f5dee_3c15_32f9_3d78_784ccf32ba71["jfrChunkAllocation()"]
  b5780ec9_74a4_594b_4225_0099765d71e7["AdaptiveByteBufAllocatorTest"]
  b68f5dee_3c15_32f9_3d78_784ccf32ba71 -->|defined in| b5780ec9_74a4_594b_4225_0099765d71e7
  f95f6269_707a_cb2d_e5c5_1293cb0ec01f["AdaptiveByteBufAllocator()"]
  b68f5dee_3c15_32f9_3d78_784ccf32ba71 -->|calls| f95f6269_707a_cb2d_e5c5_1293cb0ec01f
  style b68f5dee_3c15_32f9_3d78_784ccf32ba71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java lines 226–247

    @SuppressWarnings("Since15")
    @Test
    @EnabledForJreRange(min = JRE.JAVA_17) // RecordingStream
    @Timeout(10)
    public void jfrChunkAllocation() throws Exception {
        try (RecordingStream stream = new RecordingStream()) {
            CompletableFuture<RecordedEvent> allocateFuture = new CompletableFuture<>();

            stream.enable(AllocateChunkEvent.class);
            stream.onEvent(AllocateChunkEvent.NAME, allocateFuture::complete);
            stream.startAsync();

            AdaptiveByteBufAllocator alloc = new AdaptiveByteBufAllocator(true, false);
            alloc.directBuffer(128).release();

            RecordedEvent allocate = allocateFuture.get();
            assertEquals(AdaptivePoolingAllocator.MIN_CHUNK_SIZE, allocate.getInt("capacity"));
            assertTrue(allocate.getBoolean("pooled"));
            assertFalse(allocate.getBoolean("threadLocal"));
            assertTrue(allocate.getBoolean("direct"));
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does jfrChunkAllocation() do?
jfrChunkAllocation() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java.
Where is jfrChunkAllocation() defined?
jfrChunkAllocation() is defined in buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java at line 226.
What does jfrChunkAllocation() call?
jfrChunkAllocation() 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