diff options
author | Andrew Dolgov <[email protected]> | 2023-04-09 22:31:42 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-04-09 22:31:42 +0300 |
commit | fd5e0f98c4174bea254b790606f323b0ca73292a (patch) | |
tree | 36f6c03fb487f8582f0cdee5eeff7e8503ac5950 /classes/pluginhost.php | |
parent | e18295a3644a92280384bdb2a68e0ac436fea376 (diff) |
even more tracing
Diffstat (limited to 'classes/pluginhost.php')
-rwxr-xr-x | classes/pluginhost.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php index de2bc84e5..09c8b1671 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -344,6 +344,8 @@ class PluginHost { foreach ($this->get_hooks((string)$hook) as $plugin) { //Debug::log("invoking: " . get_class($plugin) . "->$hook()", Debug::$LOG_VERBOSE); + $p_scope = Tracer::start("$hook - " . get_class($plugin)); + try { if ($callback($plugin->$method(...$args), $plugin)) break; @@ -352,6 +354,8 @@ class PluginHost { } catch (Error $err) { user_error($err, E_USER_WARNING); } + + $p_scope->close(); } $scope->close(); @@ -444,7 +448,7 @@ class PluginHost { $class = trim($class); $class_file = strtolower(basename(clean($class))); - $p_scope = Tracer::start('load_plugin', ['file' => $class_file]); + $p_scope = Tracer::start("loading $class_file"); // try system plugin directory first $file = dirname(__DIR__) . "/plugins/$class_file/init.php"; @@ -507,6 +511,8 @@ class PluginHost { _bind_textdomain_codeset($class, "UTF-8"); } + $i_scope = Tracer::start('init and register plugin'); + try { switch ($kind) { case $this::KIND_SYSTEM: @@ -532,6 +538,8 @@ class PluginHost { user_error($err, E_USER_WARNING); } + $i_scope->close(); + } } $p_scope->close(); |