Skip to content

Commit

Permalink
Chore: Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Sep 23, 2024
1 parent aef4088 commit 68deba0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/state/optimizer/optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export function* calculate(reduxState: RootState) {
*/

const { rankby, runsAfterThisSlot } = combinations[0].core.settings;
const globalCalculationTotal = runsAfterThisSlot[0] * combinations.length;
const calculationTotal = runsAfterThisSlot[0];
const globalCalculationTotal = calculationTotal * combinations.length;

let i = 0;

Expand All @@ -86,7 +87,7 @@ export function* calculate(reduxState: RootState) {

const globalCalculationRuns = combinations.reduce((prev, cur) => prev + cur.calculationRuns, 0);
console.log(
`option ${currentIndex} progress: ${calculationRuns} / ${runsAfterThisSlot[0]}. total progress: ${globalCalculationRuns} / ${globalCalculationTotal}`,
`option ${currentIndex} progress: ${calculationRuns} / ${calculationTotal}. total progress: ${globalCalculationRuns} / ${globalCalculationTotal}`,
);

combination.list = newList;
Expand Down

0 comments on commit 68deba0

Please sign in to comment.