1 | <?php declare(strict_types = 1); |
||
15 | 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 | /** @var array */ |
||
24 | protected $data; |
||
25 | |||
26 | 1 | public function __construct() |
|
30 | |||
31 | 1 | public function reset() |
|
39 | |||
40 | /** |
||
41 | * @param DataCollectorLoggerInterface $logger |
||
42 | */ |
||
43 | 1 | public function setLogger(DataCollectorLoggerInterface $logger) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 1 | public function collect(Request $request, Response $response, \Exception $exception = null) |
|
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | 1 | public function getQueryCount(): int |
|
73 | |||
74 | /** |
||
75 | * @return array |
||
76 | */ |
||
77 | 1 | public function getQueries(): array |
|
81 | |||
82 | /** |
||
83 | * @return float |
||
84 | */ |
||
85 | 1 | public function getTime(): float |
|
89 | |||
90 | /** |
||
91 | * @return int |
||
92 | */ |
||
93 | 1 | public function getConnectionsCount(): int |
|
97 | /** |
||
98 | * @return array|string[] |
||
99 | */ |
||
100 | 1 | public function getConnections(): array |
|
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | 1 | public function getName() |
|
112 | } |
||
113 |