Home / Function/ jfrChunkAllocation() — netty Function Reference

jfrChunkAllocation() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d8b9e548_1aff_2573_4c5c_48e52788bdd3["jfrChunkAllocation()"]
  f8855572_2abf_1bf6_a32b_5cf6d1cf4947["PooledByteBufAllocatorTest"]
  d8b9e548_1aff_2573_4c5c_48e52788bdd3 -->|defined in| f8855572_2abf_1bf6_a32b_5cf6d1cf4947
  style d8b9e548_1aff_2573_4c5c_48e52788bdd3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java lines 995–1016

    @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();

            PooledByteBufAllocator alloc = newAllocator(true);
            alloc.directBuffer(128).release();

            RecordedEvent allocate = allocateFuture.get();
            assertEquals(alloc.metric().chunkSize(), 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/PooledByteBufAllocatorTest.java.
Where is jfrChunkAllocation() defined?
jfrChunkAllocation() is defined in buffer/src/test/java/io/netty/buffer/PooledByteBufAllocatorTest.java at line 995.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free