File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Model/Indexer/Product/Price/Action
Test/Unit/Model/Indexer/Product/Price Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -259,8 +259,12 @@ private function reindexByBatches(
259259 array $ dimensions ,
260260 string $ typeId
261261 ): void {
262+ $ i = 0 ;
262263 foreach ($ this ->getBatchesForIndexer ($ typeId ) as $ batch ) {
264+ $ start = microtime (true );
263265 $ this ->reindexByBatchWithDimensions ($ priceIndexer , $ batch , $ dimensions );
266+ $ time_elapsed_secs = microtime (true ) - $ start ;
267+ echo $ i ++."--> $ time_elapsed_secs secs " .PHP_EOL ;
264268 }
265269 }
266270
@@ -311,7 +315,6 @@ private function reindexByBatchWithDimensions(
311315 if (!empty ($ entityIds )) {
312316 $ this ->dimensionTableMaintainer ->createMainTmpTable ($ dimensions );
313317 $ temporaryTable = $ this ->dimensionTableMaintainer ->getMainTmpTable ($ dimensions );
314-
315318 $ priceIndexer ->executeByDimensions ($ dimensions , \SplFixedArray::fromArray ($ entityIds , false ));
316319
317320 // Sync data from temp table to index table
@@ -488,6 +491,7 @@ private function moveDataFromReplicaTableToReplicaTables(array $dimensions): voi
488491 * Retrieves the index table that should be used
489492 *
490493 * @deprecated 102.0.6
494+ * @see only used in another deprecated method: _copyRelationIndexData
491495 */
492496 protected function getIndexTargetTable (): string
493497 {
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ public function testModifyPrice(): void
9292 $ connection ->expects ($ this ->exactly (2 ))->method ('delete ' );
9393 $ connection ->expects ($ this ->any ())->method ('select ' )->willReturn ($ select );
9494 $ connection ->expects ($ this ->any ())->method ('fetchRow ' )->willReturn (['exists ' ]);
95- $ connection ->expects ($ this ->exactly (6 ))->method ('query ' );
95+ $ connection ->expects ($ this ->exactly (4 ))->method ('query ' );
96+ $ connection ->expects ($ this ->exactly (2 ))->method ('dropTemporaryTable ' );
9697 $ this ->resource ->expects ($ this ->any ())->method ('getConnection ' )->willReturn ($ connection );
9798 $ this ->resource ->expects ($ this ->any ())->method ('getTableName ' )->willReturn ('table ' );
9899 $ this ->tableStrategy ->expects ($ this ->any ())
You can’t perform that action at this time.
0 commit comments