From 30bcb24af7a416be14bff255eb1a1514b03e73ae Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 14 May 2022 06:06:38 +0000 Subject: [PATCH] Display the runtime --- src/Worker/APDelivery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Worker/APDelivery.php b/src/Worker/APDelivery.php index e06fca12dc..e341787e21 100644 --- a/src/Worker/APDelivery.php +++ b/src/Worker/APDelivery.php @@ -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) { -- 2.39.5