diff --git a/Collector/Neo4jDataCollector.php b/Collector/Neo4jDataCollector.php index 6f692d5..525b6c8 100644 --- a/Collector/Neo4jDataCollector.php +++ b/Collector/Neo4jDataCollector.php @@ -36,6 +36,12 @@ public function collect(Request $request, Response $response, \Exception $except }); } + public function reset() + { + $this->data = []; + $this->queryLogger->reset(); + } + /** * @return int */ diff --git a/Collector/QueryLogger.php b/Collector/QueryLogger.php index 45c7d48..5da479c 100644 --- a/Collector/QueryLogger.php +++ b/Collector/QueryLogger.php @@ -90,6 +90,13 @@ public function finish(StatementResultInterface $statementResult) ]); } + public function reset() + { + $this->nbQueries = 0; + $this->statements = []; + $this->statementsHash = []; + } + /** * @param Neo4jExceptionInterface $exception */