tracer-complete needs start time
This commit is contained in:
parent
8ea78eed6a
commit
b285acf70a
2 changed files with 6 additions and 6 deletions
8
composer.lock
generated
8
composer.lock
generated
|
@ -302,12 +302,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/shish/eventtracer-php.git",
|
||||
"reference": "8fc0001dffa6cc68ee56e8681a2e27579eb70dca"
|
||||
"reference": "af72034e0003d507e1d64f357612312279f02bb4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/8fc0001dffa6cc68ee56e8681a2e27579eb70dca",
|
||||
"reference": "8fc0001dffa6cc68ee56e8681a2e27579eb70dca",
|
||||
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/af72034e0003d507e1d64f357612312279f02bb4",
|
||||
"reference": "af72034e0003d507e1d64f357612312279f02bb4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -338,7 +338,7 @@
|
|||
],
|
||||
"description": "An API to write JSON traces as used by the Chrome Trace Viewer",
|
||||
"homepage": "https://github.com/shish/eventtracer-php",
|
||||
"time": "2019-07-05T14:44:25+00:00"
|
||||
"time": "2019-07-06T21:56:55+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
|
|
@ -192,7 +192,7 @@ class Database
|
|||
{
|
||||
global $_tracer;
|
||||
$dur = microtime(true) - $start;
|
||||
$_tracer->complete($dur, "DB Query", null, ["query"=>$query, "args"=>$args]);
|
||||
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", null, ["query"=>$query, "args"=>$args]);
|
||||
|
||||
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
||||
$query = trim(preg_replace('/\s+/msi', ' ', $query));
|
||||
|
@ -206,7 +206,7 @@ class Database
|
|||
}
|
||||
|
||||
$this->query_count++;
|
||||
$this->dbtime += microtime(true) - $start;
|
||||
$this->dbtime += $dur;
|
||||
}
|
||||
|
||||
public function execute(string $query, array $args=[]): PDOStatement
|
||||
|
|
Reference in a new issue