multi-tasks 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Run large batches of tasks in parallel across multiple Node.js processes, with z
4
4
 
5
5
  **New in 3.5.0 — `task_storage: 'memory'`**: keep all task state in the master process's memory instead of on disk. Same API, one config field — and ~17× faster on huge batches of small tasks. The trade-off: no resume. See [Task storage modes](#task-storage-modes).
6
6
 
7
- ![task_storage benchmark: file mode 195.1s vs memory mode 11.2s — 17.4x faster](bench-storage.svg)
7
+ ![task_storage benchmark: file mode 195.1s vs memory mode 11.2s — 17.4x faster](https://cdn.jsdelivr.net/npm/multi-tasks@latest/bench-storage.svg)
8
8
 
9
9
  ### Install:
10
10
 
@@ -178,7 +178,7 @@ multiTasks({
178
178
 
179
179
  Benchmark — 30,000 tiny tasks × 28 workers, average of 3 runs on the same machine (17–27× across repeated benchmark sessions):
180
180
 
181
- ![task_storage benchmark: file mode 195.1s vs memory mode 11.2s — 17.4x faster](bench-storage.svg)
181
+ ![task_storage benchmark: file mode 195.1s vs memory mode 11.2s — 17.4x faster](https://cdn.jsdelivr.net/npm/multi-tasks@latest/bench-storage.svg)
182
182
 
183
183
  **Getting results out in `memory` mode**: since nothing per-task hits disk, `onFinish(report, helper)` is the one and only exit for your data — iterate everything with `helper.foreachResult` (or `foreachSuccResult`/`foreachErrorResult`) and persist it yourself in one batch if you need it kept:
184
184
 
@@ -297,6 +297,7 @@ npx multi-tasks-monitor --task-dir "D:\tasks\multitasks20260806..." --port 3777
297
297
 
298
298
  ### Changelog:
299
299
 
300
+ - 3.5.1 Fix bench-storage.svg
300
301
  - 3.5.0 Add `task_storage: 'memory'` mode (~17x faster, no resume)
301
302
  - 3.4.1 Rewrite README: simpler structure, all examples verified by test cases
302
303
  - 3.4.0 Show per-worker load (ELU/CPU/memory) under progressBar; stability fixes
@@ -0,0 +1,17 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="720" height="252" viewBox="0 0 720 252" font-family="Segoe UI, Helvetica, Arial, sans-serif">
2
+ <rect x="1" y="1" width="718" height="250" rx="8" fill="#ffffff" stroke="#dadce0"/>
3
+ <text x="24" y="38" font-size="17" font-weight="600" fill="#202124">task_storage benchmark — 30,000 tasks × 28 workers</text>
4
+ <text x="24" y="60" font-size="12" fill="#5f6368">wall-clock time of a full run, average of 3 runs · lower is better</text>
5
+
6
+ <text x="112" y="114" font-size="14" fill="#202124" text-anchor="end">file</text>
7
+ <rect x="120" y="94" width="420" height="34" rx="3" fill="#9aa0a6"/>
8
+ <text x="548" y="116" font-size="14" fill="#202124">195.1s · 154 tasks/s</text>
9
+
10
+ <text x="112" y="172" font-size="14" fill="#202124" text-anchor="end">memory</text>
11
+ <rect x="120" y="152" width="24" height="34" rx="3" fill="#188038"/>
12
+ <text x="152" y="174" font-size="14" fill="#202124">11.2s · 2,676 tasks/s</text>
13
+ <text x="360" y="174" font-size="15" font-weight="700" fill="#188038">17.4× faster</text>
14
+
15
+ <line x1="120" y1="208" x2="540" y2="208" stroke="#e8eaed"/>
16
+ <text x="24" y="232" font-size="11" fill="#5f6368">per-round walls — file: 202.7 / 193.6 / 188.9s · memory: 11.3 / 11.1 / 11.3s · Windows 11, SSD · script: test-manual/bench-storage.js</text>
17
+ </svg>
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "multi-tasks",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Multi-process task scheduling based on Node.js cluster, with crash resume and failed-task restart support",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js",
8
8
  "workers",
9
- "utils/*.js"
9
+ "utils/*.js",
10
+ "bench-storage.svg"
10
11
  ],
11
12
  "repository": {
12
13
  "type": "git",