mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #9491 from appwrite/feat-add-timings-to-stats-resources
Feat: calculate and log time taken for each project
This commit is contained in:
commit
7f76bfed11
1 changed files with 4 additions and 1 deletions
|
|
@ -77,10 +77,13 @@ class StatsResources extends Action
|
|||
// Reset documents for each job
|
||||
$this->documents = [];
|
||||
|
||||
$startTime = microtime(true);
|
||||
$this->countForProject($dbForPlatform, $getLogsDB, $getProjectDB, $project);
|
||||
$endTime = microtime(true);
|
||||
$executionTime = $endTime - $startTime;
|
||||
Console::info('Project: ' . $project->getId() . '(' . $project->getInternalId() . ') aggregated in ' . $executionTime .' seconds');
|
||||
}
|
||||
|
||||
|
||||
protected function countForProject(Database $dbForPlatform, callable $getLogsDB, callable $getProjectDB, Document $project): void
|
||||
{
|
||||
Console::info('Begining count for: ' . $project->getId());
|
||||
|
|
|
|||
Loading…
Reference in a new issue