bump tracer api
This commit is contained in:
parent
f5a5352511
commit
99646a4b00
4 changed files with 7 additions and 7 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": "97b7578c3e08fe7ff797d38dc0fea4f42864bdd7"
|
||||
"reference": "f49a597b9b048421fcd5077be68adbdfbdd133fe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/97b7578c3e08fe7ff797d38dc0fea4f42864bdd7",
|
||||
"reference": "97b7578c3e08fe7ff797d38dc0fea4f42864bdd7",
|
||||
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/f49a597b9b048421fcd5077be68adbdfbdd133fe",
|
||||
"reference": "f49a597b9b048421fcd5077be68adbdfbdd133fe",
|
||||
"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-07T09:50:22+00:00"
|
||||
"time": "2019-07-07T12:22:39+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
|
|
@ -189,7 +189,7 @@ class Cache
|
|||
public function get(string $key)
|
||||
{
|
||||
global $_tracer;
|
||||
$_tracer->begin("Cache Query", null, ["key"=>$key]);
|
||||
$_tracer->begin("Cache Query", ["key"=>$key]);
|
||||
$val = $this->engine->get($key);
|
||||
if ((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
||||
$hit = $val === false ? "hit" : "miss";
|
||||
|
|
|
@ -192,7 +192,7 @@ class Database
|
|||
{
|
||||
global $_tracer;
|
||||
$dur = microtime(true) - $start;
|
||||
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", null, ["query"=>$query, "args"=>$args]);
|
||||
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", ["query"=>$query, "args"=>$args]);
|
||||
|
||||
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
||||
$query = trim(preg_replace('/\s+/msi', ' ', $query));
|
||||
|
|
|
@ -248,7 +248,7 @@ class Image
|
|||
return null;
|
||||
}
|
||||
$req_str = json_encode($req);
|
||||
$_tracer->begin("Accelerator Query", null, ["req"=>$req_str]);
|
||||
$_tracer->begin("Accelerator Query", ["req"=>$req_str]);
|
||||
fwrite($fp, $req_str);
|
||||
$data = "";
|
||||
while (($buffer = fgets($fp, 4096)) !== false) {
|
||||
|
|
Reference in a new issue