sumMatrixBench::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Np\benchmarks\matrix\arithmetic;
4
5
use Np\matrix;
6
7
/**
8
 * @Groups({"Arithmetic"})
9
 * @BeforeMethods({"setUp"})
10
 */
11
class sumMatrixBench
12
{
13
    /**
14
     * @var \Np\matrix
15
     */
16
    protected $a,$b;
17
18
    public function setUp() : void {
19
        $this->a = matrix::uniform(500, 500);
20
        $this->b = matrix::uniform(500, 500);
21
    }
22
23
    /**
24
     * @Subject
25
     * @Iterations(5)
26
     * @revs(5)
27
     * @OutputTimeUnit("seconds", precision=3)
28
     */
29
    public function sum() : void
30
    {
31
        $this->a->sum($this->b);
32
    }
33
}
34