Completed
Push — develop ( d2e190...d276d7 )
by Alec
10:43 queued 07:55
created

BenchmarkFields::getAdded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Tools\Traits;
4
5
use AlecRabbit\Accessories\MemoryUsage\MemoryUsageReport;
6
use AlecRabbit\Tools\Internal\BenchmarkFunction;
7
use AlecRabbit\Tools\Profiler;
8
use AlecRabbit\Tools\SimpleCounter;
9
use AlecRabbit\Tools\Timer;
10
11
trait BenchmarkFields
12
{
13
    /** @var BenchmarkFunction[] */
14
    protected $functions = [];
15
16
//    /** @var Profiler */
17
//    protected $profiler;
18
//
19
    /** @var MemoryUsageReport */
20
    protected $memoryUsageReport;
21
22
    /** @var int */
23
    protected $doneIterations = 0;
24
25
    /** @var int */
26
    protected $doneIterationsCombined = 0;
27
28
    /** @var Timer */
29
    protected $timer;
30
31
    /** @var SimpleCounter */
32
    protected $added;
33
34
    /** @var SimpleCounter */
35
    protected $benchmarked;
36
37
38
    /**
39
     * @return BenchmarkFunction[]
40
     */
41
    public function getFunctions(): array
42
    {
43
        return $this->functions;
44
    }
45
46
    /**
47
     * @return int
48
     */
49
    public function getDoneIterations(): int
50
    {
51
        return $this->doneIterations;
52
    }
53
54
    /**
55
     * @return Timer
56
     */
57
    public function getTimer(): Timer
58
    {
59
        return $this->timer;
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getDoneIterationsCombined(): int
66
    {
67
        return $this->doneIterationsCombined;
68
    }
69
70
    /**
71
     * @return MemoryUsageReport
72
     */
73
    public function getMemoryUsageReport(): MemoryUsageReport
74
    {
75
        return $this->memoryUsageReport;
76
    }
77
78
    /**
79
     * @return SimpleCounter
80
     */
81
    public function getAdded(): SimpleCounter
82
    {
83
        return $this->added;
84
    }
85
86
    /**
87
     * @return SimpleCounter
88
     */
89
    public function getBenchmarked(): SimpleCounter
90
    {
91
        return $this->benchmarked;
92
    }
93
}
94