File tree 1 file changed +10
-6
lines changed
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)
41
41
}
42
42
43
43
$ 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
+ ];
45
52
$ this ->statementsHash [$ statementText ][$ statementParams ][$ tag ] = $ idx ;
46
53
}
47
54
@@ -64,13 +71,10 @@ public function finish(StatementResultInterface $statementResult)
64
71
$ idx = $ this ->statementsHash [$ statementText ][$ encodedParameters ][$ tag ];
65
72
}
66
73
67
- $ this ->statements [$ idx ] += [
74
+ $ this ->statements [$ idx ] = array_merge ( $ this -> statements [ $ idx ], [
68
75
'end_time ' => microtime (true ) * 1000 ,
69
- 'query ' => $ statementText ,
70
- 'parameters ' => $ statementParams ,
71
- 'tag ' => $ statement ->getTag (),
72
76
'nb_results ' => $ statementResult ->size (),
73
- ];
77
+ ]) ;
74
78
}
75
79
76
80
/**
You can’t perform that action at this time.
0 commit comments