grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026removedRecordsCount; } /** @return int */ public function getIndexedRecordsCount() { return $this->indexedRecordsCount; } /** @return int */ public function getIndexedFieldsCount() { return $this->indexedFieldsCount; } /** @return int */ public function getIndexedModulesCount() { return $this->indexedModulesCount; } /** * Shows statistics for the past run. * * @param float $end * @param float $start */ private function statistics($end, $start) { if ($this->removedRecordsCount) { $this->logger->debug(sprintf('%s records have been removed', $this->removedRecordsCount)); } if ($this->indexedRecordsCount === 0) { $this->logger->debug('No record has been indexed'); return; } $elapsed = ($end - $start); // seconds $this->logger->debug(sprintf('%d modules, %d records and %d fields indexed in %01.3F s', $this->indexedModulesCount, $this->indexedRecordsCount, $this->indexedFieldsCount, $elapsed)); if ($this->indexedRecordsCount > 100) { $estimation = $elapsed / $this->indexedRecordsCount * 200000; CarbonInterval::setLocale('en'); $estimationString = CarbonInterval::seconds(intval(round($estimation)))->cascade()->forHumans(true); $fieldsSpeed = $this->indexedFieldsCount / $elapsed; $this->logger->debug(sprintf('Average speed is %01.3F fields/s', $fieldsSpeed)); $this->logger->debug("It would take ~$estimationString for 200,000 records, assuming a linear expansion"); } } /** Resets the counters to zero. */ private function resetCounts() { $this->indexedModulesCount = 0; $this->indexedRecordsCount = 0; $this->indexedFieldsCount = 0; $this->removedRecordsCount = 0; } }