From 99646a4b00bde58171a6ea44d81337445b2518af Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 7 Jul 2019 13:30:50 +0100 Subject: [PATCH] bump tracer api --- composer.lock | 8 ++++---- core/cacheengine.php | 2 +- core/database.php | 2 +- core/imageboard/image.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 28844762..210c3c56 100644 --- a/composer.lock +++ b/composer.lock @@ -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": [ diff --git a/core/cacheengine.php b/core/cacheengine.php index 848c4200..862bbf1f 100644 --- a/core/cacheengine.php +++ b/core/cacheengine.php @@ -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"; diff --git a/core/database.php b/core/database.php index 8527f08a..a95348b9 100644 --- a/core/database.php +++ b/core/database.php @@ -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)); diff --git a/core/imageboard/image.php b/core/imageboard/image.php index f0ff214e..05ad5db8 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -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) {