diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ca5d522e37..934793410b 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -88,11 +88,7 @@ App::post('/v1/projects') ->inject('hooks') ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Request $request, Response $response, Database $dbForConsole, Cache $cache, Group $pools, Hooks $hooks) { - $ctime = time(); - var_dump("[".$region."] - Before getDocument('teams')"); $team = $dbForConsole->getDocument('teams', $teamId); - $diff = time() - $ctime; - var_dump("[".$region."] - After getDocument('teams') : " . $diff . " sec"); if ($team->isEmpty()) { throw new Exception(Exception::TEAM_NOT_FOUND); @@ -149,8 +145,6 @@ App::post('/v1/projects') } try { - $ctime = time(); - var_dump("[".$region."] - Before createDocument('projects')"); $project = $dbForConsole->createDocument('projects', new Document([ '$id' => $projectId, '$permissions' => [ @@ -184,10 +178,6 @@ App::post('/v1/projects') 'search' => implode(' ', [$projectId, $name]), 'database' => $dsn, ])); - - $diff = time() - $ctime; - var_dump("[".$region."] - After createDocument('projects') : " . $diff . " sec"); - } catch (Duplicate) { throw new Exception(Exception::PROJECT_ALREADY_EXISTS); } @@ -239,12 +229,7 @@ App::post('/v1/projects') }, $collection['indexes']); try { - - $ctime = time(); - var_dump("[".$region."] - Before createCollection('".$key."')"); $dbForProject->createCollection($key, $attributes, $indexes); - $diff = time() - $ctime; - var_dump("[".$region."] - After createCollection('".$key."') : " . $diff . " sec"); } catch (Duplicate) { // Collection already exists } diff --git a/app/controllers/general.php b/app/controllers/general.php index ecaf066176..04554a940e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -451,9 +451,6 @@ App::init() ->inject('queueForEvents') ->inject('queueForCertificates') ->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Document $console, Document $project, Database $dbForConsole, callable $getProjectDB, Locale $locale, array $localeCodes, array $clients, Reader $geodb, Usage $queueForUsage, Event $queueForEvents, Certificate $queueForCertificates) { - $ctime = time(); - var_dump("[".$region."] - Before general first init hook"); - /* * Appwrite Router */ @@ -658,9 +655,6 @@ App::init() ) { throw new AppwriteException(AppwriteException::GENERAL_UNKNOWN_ORIGIN, $originValidator->getDescription()); } - - $diff = time() - $ctime; - var_dump("[".$region."] - After general first init hook : " . $diff . " sec"); }); App::options() diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index f72672a357..f0d896c95a 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -162,9 +162,6 @@ App::init() ->inject('mode') ->inject('team') ->action(function (App $utopia, Request $request, Database $dbForConsole, Document $project, Document $user, ?Document $session, array $servers, string $mode, Document $team) { - $ctime = time(); - var_dump("[".$region."] - Before shared api first init hook"); - $route = $utopia->getRoute(); if ($project->isEmpty()) { @@ -347,8 +344,6 @@ App::init() throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED); } } - $diff = time() - $ctime; - var_dump("[".$region."] - After shared api first init hook : " . $diff . " sec"); }); App::init() @@ -368,8 +363,7 @@ App::init() ->inject('dbForProject') ->inject('mode') ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Usage $queueForUsage, Database $dbForProject, string $mode) use ($databaseListener) { - $ctime = time(); - var_dump("[".$region."] - Before shared api second init hook"); + $route = $utopia->getRoute(); if ( @@ -527,8 +521,6 @@ App::init() ; } } - $diff = time() - $ctime; - var_dump("[".$region."] - After shared api first init hook : " . $diff . " sec"); }); App::init() @@ -559,10 +551,6 @@ App::shutdown() ->inject('project') ->inject('dbForProject') ->action(function (App $utopia, Request $request, Response $response, Document $project, Database $dbForProject) { - $ctime = time(); - var_dump("[".$region."] - Before shared api first shutdown hook"); - $route = $utopia->getRoute(); - $sessionLimit = $project->getAttribute('auths', [])['maxSessions'] ?? APP_LIMIT_USER_SESSIONS_DEFAULT; $session = $response->getPayload(); $userId = $session['userId'] ?? ''; @@ -587,8 +575,6 @@ App::shutdown() } $dbForProject->purgeCachedDocument('users', $userId); - $diff = time() - $ctime; - var_dump("[".$region."] - After shared api first shutdown hook : " . $diff . " sec"); }); App::shutdown() @@ -611,10 +597,6 @@ App::shutdown() ->inject('dbForConsole') ->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $queueForEvents, Audit $queueForAudits, Usage $queueForUsage, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, Messaging $queueForMessaging, Database $dbForProject, Func $queueForFunctions, string $mode, Database $dbForConsole) use ($parseLabel) { - $ctime = time(); - var_dump("[".$region."] - Before shared api second shutdown hook"); - $route = $utopia->getRoute(); - $responsePayload = $response->getPayload(); if (!empty($queueForEvents->getEvent())) { @@ -816,8 +798,6 @@ App::shutdown() } } } - $diff = time() - $ctime; - var_dump("[".$region."] - After shared api second shutdown hook : " . $diff . " sec"); }); App::init()