1 | <?php declare(strict_types = 1); |
||
15 | final class MongoDbDataCollector extends DataCollector |
||
16 | { |
||
17 | const QUERY_KEYWORD = 'queries'; |
||
18 | const CONNECTION_KEYWORD = 'connections'; |
||
19 | const TIME_KEYWORD = 'totalTime'; |
||
20 | |||
21 | /** @var DataCollectorLoggerInterface */ |
||
22 | private $logger; |
||
23 | |||
24 | 1 | public function __construct() |
|
32 | |||
33 | /** |
||
34 | * @param DataCollectorLoggerInterface $logger |
||
35 | */ |
||
36 | 1 | public function setLogger(DataCollectorLoggerInterface $logger) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 1 | public function collect(Request $request, Response $response, \Exception $exception = null) |
|
56 | |||
57 | /** |
||
58 | * @return int |
||
59 | */ |
||
60 | 1 | public function getQueryCount(): int |
|
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | 1 | public function getQueries(): array |
|
72 | |||
73 | /** |
||
74 | * @return float |
||
75 | */ |
||
76 | 1 | public function getTime(): float |
|
80 | |||
81 | /** |
||
82 | * @return int |
||
83 | */ |
||
84 | 1 | public function getConnectionsCount(): int |
|
88 | /** |
||
89 | * @return array|string[] |
||
90 | */ |
||
91 | 1 | public function getConnections(): array |
|
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | 1 | public function getName() |
|
103 | } |
||
104 |