| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function push(Result $result) |
||
| 30 | { |
||
| 31 | $resourceFactory = new ResourceFactory($this->getClient()); |
||
| 32 | $metricResource = $resourceFactory->get('metricPoint'); |
||
| 33 | |||
| 34 | try { |
||
| 35 | $metricResource->createMetricPoint([ |
||
| 36 | 'metric' => $result->getUrl()->getMetricUuid(), |
||
| 37 | 'value' => $result->getReponseTime() * 1000, |
||
| 38 | 'datetime' => date('Y-m-d H:i:s'), |
||
| 39 | ]); |
||
| 40 | } catch (\Exception $e) { |
||
| 41 | echo sprintf('An error has occured %s', $e->getMessage()); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 |