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: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Generates **millions of documents** at **maximum speed**, utilizing **all CPU th
16
16
17
17
### Features
18
18
19
-
1.**Multi-threading** - each thread inserts documents in parallel. The generation speed of **[1,000,000](#screenshot_1) documents** with an average content size is **7 seconds** (PC configuration: i5-12600K, DDR4 80GB, SSD 980 PRO 1TB).
19
+
1.**Multi-threading** - each thread inserts documents in parallel. The generation speed of **[1,000,000](#screenshot_1) documents** with an average content size is **7 seconds** (Benchmark system configuration: Intel i5-12600K, 80GB DDR4 RAM, Samsung 980 PRO 1TB SSD).
20
20
2.**Specify the number of threads** for data generation to adjust CPU load, **or set it to** <code>max</code> to utilize all available threads.
21
21
3. Document distribution across threads considering the remainder.
22
22
4. Generation with custom data schemas through the <code>generatingData</code> function.
@@ -30,7 +30,7 @@ Generates **millions of documents** at **maximum speed**, utilizing **all CPU th
Generation of **1,000,000 documents** in **7 seconds**, filled with [superMaker](https://www.npmjs.com/package/super-maker), with the following [content](https://github.com/AndrewShedov/turboMaker/blob/main/config%20examples/posts/turbo-maker.config.js).<br>
33
-
PC configuration: i5-12600K, DDR4 80GB, SSD 980 PRO 1TB.
33
+
Benchmark system configuration: Intel i5-12600K, 80GB DDR4 RAM, Samsung 980 PRO 1TB SSD.
34
34
35
35
<spanid="screenshot_3"></span>
36
36
@@ -39,7 +39,7 @@ PC configuration: i5-12600K, DDR4 80GB, SSD 980 PRO 1TB.
Generation of **500,000,000 documents** in **7 hr 10 min**, filled with [superMaker](https://www.npmjs.com/package/super-maker), with the following [content](https://github.com/AndrewShedov/turboMaker/blob/main/config%20examples/posts/turbo-maker.config.js).<br>
41
41
When generating more than 10,000,000 documents, the speed may decrease periodically due to I/O and MongoDB-overhead.<br>
42
-
PC configuration: i5-12600K, DDR4 80GB, SSD 980 PRO 1TB.
42
+
Benchmark system configuration: Intel i5-12600K, 80GB DDR4 RAM, Samsung 980 PRO 1TB SSD.
43
43
44
44
----------------------------------------
45
45
@@ -76,11 +76,11 @@ npm i turbo-maker
76
76
npm run turboMaker
77
77
```
78
78
79
-
### Explanation of the file structure - turbo-maker.config.js.
79
+
### Explanation of the file structure - turbo-maker.config.js
80
80
81
81
### Config options
82
82
83
-
Required fields must be specified:
83
+
Required fields:
84
84
85
85
```js
86
86
uri:'mongodb://127.0.0.1:27017',
@@ -112,7 +112,7 @@ Accepts a <code>number</code> of documents per batch inserted into the database.
112
112
113
113
**timeStepMs**
114
114
115
-
Accepts a <code>number</code> and sets the time interval between <code>createdAt</code> timestamps (<code>updatedAt</code> is the same as <code>createdAt</code>).
115
+
Accepts a <code>number</code> and sets the time interval between <code>createdAt</code> timestamps (<code>updatedAt</code> repeats the value <code>createdAt</code>).
116
116
117
117
- With a value of <code>0</code>, a large number of documents will have the same <code>createdAt</code> due to the high generation speed, especially in multi-threaded mode. To fine-tune the <code>timeStepMs</code>, use [mongoChecker](https://www.npmjs.com/package/mongo-checker) to check for duplicate <code>createdAt</code> fields in the generated documents.
118
118
@@ -217,4 +217,8 @@ Simulation of [CRYSTAL v2.0](https://shedov.top/about-the-crystal-project/) oper
217
217
</a>
218
218
</p>
219
219
220
+
221
+
### A [Rust version](https://crates.io/crates/turbo-maker) of the generator is currently being developed, which performs much faster (up to 7.87x (687%)) according to the results of hybrid (CPU | I/O) testing.
Copy file name to clipboardExpand all lines: config examples/Parallel Computation Benchmark/turbo-maker.config.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ Parallel Computation Benchmark
4
4
-----
5
5
Testing the performance of Node.js in multi-threaded computation tasks, evaluating language efficiency, thread utilization, CPU capabilities, and I/O operations with MongoDB.
6
6
7
-
Adjust the value - 'generateLongString(100)', to regulate the load.
7
+
Adjust the value - 'generateLongString(500)', to regulate the load.
8
8
-----
9
9
*/
10
10
11
11
exportconstconfig={
12
12
uri: 'mongodb://127.0.0.1:27017',
13
-
db: 'crystalTest',
13
+
db: 'crystal',
14
14
collection: 'posts',
15
15
numberThreads: 'max',
16
16
numberDocuments: 1_000_000,
@@ -35,6 +35,6 @@ export function generateLongString(length) {
0 commit comments