| Total Complexity | 8 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | class BenchmarkResult |
||
| 8 | { |
||
| 9 | /** @var float */ |
||
| 10 | protected $mean; |
||
| 11 | /** @var float */ |
||
| 12 | protected $delta; |
||
| 13 | /** @var int */ |
||
| 14 | protected $numberOfMeasurements; |
||
| 15 | /** @var int */ |
||
| 16 | protected $numberOfRejections; |
||
| 17 | |||
| 18 | public function __construct(float $mean, float $delta, int $numberOfMeasurements, int $numberOfRejections = 0) |
||
| 19 | { |
||
| 20 | $this->mean = $mean; |
||
| 21 | $this->delta = $delta; |
||
| 22 | $this->numberOfMeasurements = $numberOfMeasurements; |
||
| 23 | $this->numberOfRejections = $numberOfRejections; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getDeltaPercent(): float |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return float |
||
| 33 | */ |
||
| 34 | public function getDelta(): float |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return float |
||
| 41 | */ |
||
| 42 | public function getMean(): float |
||
| 43 | { |
||
| 44 | return $this->mean; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getRejectionsPercent(): float |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | public function getNumberOfRejections(): int |
||
| 56 | { |
||
| 57 | return $this->numberOfRejections; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getNumberOfMeasurements(): int |
||
| 66 | } |
||
| 67 | |||
| 68 | public function __toString(): string |
||
| 75 | ); |
||
| 76 | } |
||
| 77 | } |
||
| 78 |