RegionsSummary   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 15 1
A __construct() 0 14 1
1
<?php
2
3
/**
4
 * This file is part of the reliforp/reli-prof package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Reli\Lib\PhpProcessReader\PhpMemoryReader\RegionAnalyzer\Result;
15
16
final class RegionsSummary
17
{
18
    public function __construct(
19
        public int $zend_mm_heap_total,
20
        public int $zend_mm_heap_usage,
21
        public int $zend_mm_chunk_total,
22
        public int $zend_mm_chunk_usage,
23
        public int $zend_mm_huge_total,
24
        public int $zend_mm_huge_usage,
25
        public int $vm_stack_total,
26
        public int $vm_stack_usage,
27
        public int $compiler_arena_total,
28
        public int $compiler_arena_usage,
29
        public int $possible_allocation_overhead_total,
30
        public int $possible_array_overhead_total,
31
    ) {
32
    }
33
34
    /**
35
     * @return array<string, int>
36
     */
37
    public function toArray(): array
38
    {
39
        return [
40
            'zend_mm_heap_total' => $this->zend_mm_heap_total,
41
            'zend_mm_heap_usage' => $this->zend_mm_heap_usage,
42
            'zend_mm_chunk_total' => $this->zend_mm_chunk_total,
43
            'zend_mm_chunk_usage' => $this->zend_mm_chunk_usage,
44
            'zend_mm_huge_total' => $this->zend_mm_huge_total,
45
            'zend_mm_huge_usage' => $this->zend_mm_huge_usage,
46
            'vm_stack_total' => $this->vm_stack_total,
47
            'vm_stack_usage' => $this->vm_stack_usage,
48
            'compiler_arena_total' => $this->compiler_arena_total,
49
            'compiler_arena_usage' => $this->compiler_arena_usage,
50
            'possible_allocation_overhead_total' => $this->possible_allocation_overhead_total,
51
            'possible_array_overhead_total' => $this->possible_array_overhead_total,
52
        ];
53
    }
54
}
55