You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Console/Command/BatchingOptimizeCommand.php
+18-12Lines changed: 18 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -32,17 +32,22 @@ class BatchingOptimizeCommand extends AbstractStoreCommand
32
32
33
33
/**
34
34
* Margin to ensure not to exceed maximum batch size when catalog is a mix between various product types
35
-
* (i.e. with a lot of record sizes variations) - can be updated by the --margin option (from 0 to 10)
36
-
* 0 => The recommended batch size will be almost equal to the strictly calculated maximum batch size
37
-
* [1 to 9] => The more this value is, the more the recommended batch size will differ from the calculated maximum batch size
38
-
* 10 => Highest possible value, the recommended batch size will be greatly lower than the calculated maximum batch size
35
+
* (i.e. with a lot of record sizes variations) - can be updated by the --margin option (from 0.25 to 3.00)
36
+
* 0.00 => Lowest possible value (0.00 * standard deviation = 0), the recommended batch size will be almost equal to the strictly calculated maximum batch size
37
+
* 0.25 => Default value (0.25 * standard deviation), the recommended batch size will be close to the strictly calculated maximum batch size
38
+
* 3.00 => Highest possible value (3 * standard deviation), the recommended batch size will be greatly lower than the calculated maximum batch size
39
39
*/
40
-
protectedconstDEFAULT_MARGIN = 1;
40
+
protectedconstDEFAULT_MARGIN = 0.25;
41
+
42
+
/**
43
+
* Min value for safety margin
44
+
*/
45
+
protectedconstMIN_MARGIN = 0;
41
46
42
47
/**
43
48
* Max value for safety margin
44
49
*/
45
-
protectedconstMAX_MARGIN = 10;
50
+
protectedconstMAX_MARGIN = 3;
46
51
47
52
/**
48
53
* The sample size if the amount of products fetched to determine the recommended batch size
@@ -133,7 +138,7 @@ protected function getAdditionalDefinition(): array
133
138
self::OPTION_MARGIN,
134
139
'-' . self::OPTION_MARGIN_SHORTCUT,
135
140
InputOption::VALUE_REQUIRED,
136
-
'Safety margin - DEFAULT: ' . self::DEFAULT_MARGIN . ' - FROM 0 TO ' . self::MAX_MARGIN,
141
+
'Safety margin - DEFAULT: ' . self::DEFAULT_MARGIN . ' - FROM ' . self::MIN_MARGIN . ' TO ' . self::MAX_MARGIN,
137
142
)
138
143
];
139
144
}
@@ -181,11 +186,12 @@ protected function validateOptions(): void
0 commit comments