From 96180015bc70d9c3ff69f80a312d37494403f156 Mon Sep 17 00:00:00 2001 From: Smoren Date: Sun, 12 May 2024 21:26:19 +0300 Subject: [PATCH] Commands refactoring. --- package.json | 3 +-- src/scripts/actions/test-parallel.ts | 4 ++-- src/scripts/actions/test-simulation.ts | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 42fdd91..f4e80e5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build-only": "vite build", "type-check": "vue-tsc --noEmit", "test": "jest", - "tool": "tsx --require=@nextools/suppress-experimental-warnings src/scripts/tool.ts" + "tool": "tsx --no-warnings src/scripts/tool.ts" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -29,7 +29,6 @@ "vue": "^3.4.15" }, "devDependencies": { - "@nextools/suppress-experimental-warnings": "^0.1.0", "@types/jest": "^29.5.12", "@types/node": "^18.19.33", "@vitejs/plugin-vue": "^4.0.0", diff --git a/src/scripts/actions/test-parallel.ts b/src/scripts/actions/test-parallel.ts index fbb851b..7013e95 100644 --- a/src/scripts/actions/test-parallel.ts +++ b/src/scripts/actions/test-parallel.ts @@ -14,8 +14,8 @@ function task(x: number) { export const actionTestParallel = async (...args: string[]) => { console.log('[START] test parallel action', args); - const pool = new Pool(20); // spawns 4 child processes to complete your jobs - const result = await pool.map([1, 2, 3, 4, 5, 6, 7, 8, 9], task); + const pool = new Pool(20); + const result = await pool.map([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150], task); console.log(result); pool.close(); diff --git a/src/scripts/actions/test-simulation.ts b/src/scripts/actions/test-simulation.ts index 521cebd..7cfaaa8 100644 --- a/src/scripts/actions/test-simulation.ts +++ b/src/scripts/actions/test-simulation.ts @@ -1,10 +1,10 @@ import { createBaseWorldConfig } from '@/lib/config/world'; import { createBaseTypesConfig } from '@/lib/config/types'; import { create2dBaseInitialConfig } from '@/lib/config/initial'; -import { Simulation } from '@/lib/simulation'; import { createPhysicModel } from '@/lib/utils/functions'; import { create2dRandomDistribution } from '@/lib/config/atoms'; import { createDummyDrawer } from '@/lib/drawer/dummy'; +import { Simulation } from '@/lib/simulation'; import { Runner } from '@/lib/runner'; import { CompoundsAnalyzer } from '@/lib/analysis/compounds';