]> git.mxchange.org Git - friendica.git/commitdiff
Display the runtime
authorMichael <heluecht@pirati.ca>
Sat, 14 May 2022 06:06:38 +0000 (06:06 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 14 May 2022 06:06:38 +0000 (06:06 +0000)
src/Worker/APDelivery.php

index e06fca12dc3c1ca7e14d4db8a8fd0c1153503e40..e341787e21151bdc7740936f00daaeca4a81dc2e 100644 (file)
@@ -146,11 +146,13 @@ class APDelivery
                } else {
                        $data = ActivityPub\Transmitter::createCachedActivityFromItem($item_id);
                        if (!empty($data)) {
+                               $timestamp = microtime(true);
                                $response = HTTPSignature::post($data, $inbox, $uid);
+                               $runtime  = microtime(true) - $timestamp;
                                $success  = $response->isSuccess();
                                $timeout  = $response->isTimeout();
                                if (!$success) {
-                                       Logger::debug('Delivery failed', ['retcode' => $response->getReturnCode(), 'timeout' => $timeout, 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]);
+                                       Logger::debug('Delivery failed', ['retcode' => $response->getReturnCode(), 'timeout' => $timeout, 'runtime' => round($runtime, 3), 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]);
                                }
                                if ($uri_id) {
                                        if ($success) {