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(
259
259
array $ dimensions ,
260
260
string $ typeId
261
261
): void {
262
+ $ i = 0 ;
262
263
foreach ($ this ->getBatchesForIndexer ($ typeId ) as $ batch ) {
264
+ $ start = microtime (true );
263
265
$ this ->reindexByBatchWithDimensions ($ priceIndexer , $ batch , $ dimensions );
266
+ $ time_elapsed_secs = microtime (true ) - $ start ;
267
+ echo $ i ++."--> $ time_elapsed_secs secs " .PHP_EOL ;
264
268
}
265
269
}
266
270
@@ -311,7 +315,6 @@ private function reindexByBatchWithDimensions(
311
315
if (!empty ($ entityIds )) {
312
316
$ this ->dimensionTableMaintainer ->createMainTmpTable ($ dimensions );
313
317
$ temporaryTable = $ this ->dimensionTableMaintainer ->getMainTmpTable ($ dimensions );
314
-
315
318
$ priceIndexer ->executeByDimensions ($ dimensions , \SplFixedArray::fromArray ($ entityIds , false ));
316
319
317
320
// Sync data from temp table to index table
@@ -488,6 +491,7 @@ private function moveDataFromReplicaTableToReplicaTables(array $dimensions): voi
488
491
* Retrieves the index table that should be used
489
492
*
490
493
* @deprecated 102.0.6
494
+ * @see only used in another deprecated method: _copyRelationIndexData
491
495
*/
492
496
protected function getIndexTargetTable (): string
493
497
{
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ public function testModifyPrice(): void
92
92
$ connection ->expects ($ this ->exactly (2 ))->method ('delete ' );
93
93
$ connection ->expects ($ this ->any ())->method ('select ' )->willReturn ($ select );
94
94
$ 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 ' );
96
97
$ this ->resource ->expects ($ this ->any ())->method ('getConnection ' )->willReturn ($ connection );
97
98
$ this ->resource ->expects ($ this ->any ())->method ('getTableName ' )->willReturn ('table ' );
98
99
$ this ->tableStrategy ->expects ($ this ->any ())
You can’t perform that action at this time.
0 commit comments