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) |
|
61 | |||
62 | /** |
||
63 | * @return int |
||
64 | */ |
||
65 | 1 | public function getQueryCount(): int |
|
69 | |||
70 | /** |
||
71 | * @return array |
||
72 | */ |
||
73 | 1 | public function getQueries(): array |
|
77 | |||
78 | /** |
||
79 | * @return float |
||
80 | */ |
||
81 | 1 | public function getTime(): float |
|
85 | |||
86 | /** |
||
87 | * @return int |
||
88 | */ |
||
89 | 1 | public function getConnectionsCount(): int |
|
93 | /** |
||
94 | * @return array|string[] |
||
95 | */ |
||
96 | 1 | public function getConnections(): array |
|
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | 1 | public function getName() |
|
108 | } |
||
109 |