File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,14 @@ public function record(StatementInterface $statement)
4141 }
4242
4343 $ idx = $ this ->nbQueries ++;
44- $ this ->statements [$ idx ]['start_time ' ] = microtime (true ) * 1000 ;
44+ $ this ->statements [$ idx ] = [
45+ 'start_time ' => microtime (true ) * 1000 ,
46+ 'end_time ' => microtime (true ) * 1000 , // same
47+ 'nb_results ' => 0 ,
48+ 'query ' => $ statementText ,
49+ 'parameters ' => $ statementParams ,
50+ 'tag ' => $ statement ->getTag (),
51+ ];
4552 $ this ->statementsHash [$ statementText ][$ statementParams ][$ tag ] = $ idx ;
4653 }
4754
@@ -64,13 +71,10 @@ public function finish(StatementResultInterface $statementResult)
6471 $ idx = $ this ->statementsHash [$ statementText ][$ encodedParameters ][$ tag ];
6572 }
6673
67- $ this ->statements [$ idx ] += [
74+ $ this ->statements [$ idx ] = array_merge ( $ this -> statements [ $ idx ], [
6875 'end_time ' => microtime (true ) * 1000 ,
69- 'query ' => $ statementText ,
70- 'parameters ' => $ statementParams ,
71- 'tag ' => $ statement ->getTag (),
7276 'nb_results ' => $ statementResult ->size (),
73- ];
77+ ]) ;
7478 }
7579
7680 /**
You can’t perform that action at this time.
0 commit comments