bump tracer api
This commit is contained in:
parent
f5a5352511
commit
99646a4b00
8
composer.lock
generated
8
composer.lock
generated
@ -302,12 +302,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/shish/eventtracer-php.git",
|
"url": "https://github.com/shish/eventtracer-php.git",
|
||||||
"reference": "97b7578c3e08fe7ff797d38dc0fea4f42864bdd7"
|
"reference": "f49a597b9b048421fcd5077be68adbdfbdd133fe"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/97b7578c3e08fe7ff797d38dc0fea4f42864bdd7",
|
"url": "https://api.github.com/repos/shish/eventtracer-php/zipball/f49a597b9b048421fcd5077be68adbdfbdd133fe",
|
||||||
"reference": "97b7578c3e08fe7ff797d38dc0fea4f42864bdd7",
|
"reference": "f49a597b9b048421fcd5077be68adbdfbdd133fe",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -338,7 +338,7 @@
|
|||||||
],
|
],
|
||||||
"description": "An API to write JSON traces as used by the Chrome Trace Viewer",
|
"description": "An API to write JSON traces as used by the Chrome Trace Viewer",
|
||||||
"homepage": "https://github.com/shish/eventtracer-php",
|
"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": [
|
"packages-dev": [
|
||||||
|
@ -189,7 +189,7 @@ class Cache
|
|||||||
public function get(string $key)
|
public function get(string $key)
|
||||||
{
|
{
|
||||||
global $_tracer;
|
global $_tracer;
|
||||||
$_tracer->begin("Cache Query", null, ["key"=>$key]);
|
$_tracer->begin("Cache Query", ["key"=>$key]);
|
||||||
$val = $this->engine->get($key);
|
$val = $this->engine->get($key);
|
||||||
if ((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
if ((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
||||||
$hit = $val === false ? "hit" : "miss";
|
$hit = $val === false ? "hit" : "miss";
|
||||||
|
@ -192,7 +192,7 @@ class Database
|
|||||||
{
|
{
|
||||||
global $_tracer;
|
global $_tracer;
|
||||||
$dur = microtime(true) - $start;
|
$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'])) {
|
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
||||||
$query = trim(preg_replace('/\s+/msi', ' ', $query));
|
$query = trim(preg_replace('/\s+/msi', ' ', $query));
|
||||||
|
@ -248,7 +248,7 @@ class Image
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$req_str = json_encode($req);
|
$req_str = json_encode($req);
|
||||||
$_tracer->begin("Accelerator Query", null, ["req"=>$req_str]);
|
$_tracer->begin("Accelerator Query", ["req"=>$req_str]);
|
||||||
fwrite($fp, $req_str);
|
fwrite($fp, $req_str);
|
||||||
$data = "";
|
$data = "";
|
||||||
while (($buffer = fgets($fp, 4096)) !== false) {
|
while (($buffer = fgets($fp, 4096)) !== false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user