1 | <?php |
||
21 | class StopWatch { |
||
22 | |||
23 | /** |
||
24 | * @var AbstractStorage |
||
25 | * the storage to store the result at |
||
26 | */ |
||
27 | protected $storage; |
||
28 | |||
29 | /** |
||
30 | * @var float |
||
31 | * the moment the measurement started |
||
32 | */ |
||
33 | protected $start; |
||
34 | |||
35 | /** |
||
36 | * StopWatch constructor. |
||
37 | * @param AbstractStorage $storage |
||
38 | * the storage to store the result at |
||
39 | */ |
||
40 | public function __construct(AbstractStorage $storage) { |
||
43 | |||
44 | /** |
||
45 | * To start the measurement. |
||
46 | */ |
||
47 | public function start() { |
||
50 | |||
51 | /**+ |
||
52 | * To stop and store the measurement as float seconds. |
||
53 | * |
||
54 | * @param string $metric |
||
55 | * the name of the metric |
||
56 | * @param string $key |
||
57 | * the key |
||
58 | */ |
||
59 | public function stop($metric, $key) { |
||
63 | |||
64 | } |
||
65 |