Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait Duration |
||
8 | { |
||
9 | /** |
||
10 | * How long the transaction/span took to complete, in ms with 3 decimal points |
||
11 | * |
||
12 | * @var double|null |
||
13 | */ |
||
14 | private $duration; |
||
15 | |||
16 | /** |
||
17 | * @var Stopwatch |
||
18 | */ |
||
19 | private $stopwatch; |
||
20 | |||
21 | /** |
||
22 | * @return double|null |
||
23 | */ |
||
24 | 3 | public function duration() |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return void |
||
31 | * |
||
32 | * @throws \ZoiloMora\ElasticAPM\Helper\Stopwatch\Exception\NotStartedException |
||
33 | * @throws \ZoiloMora\ElasticAPM\Helper\Stopwatch\Exception\NotStoppedException |
||
34 | */ |
||
35 | 9 | private function stopClock() |
|
39 | 9 | } |
|
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | 11 | public function isFinished() |
|
49 |