Skip to content

Commit f056033

Browse files
committed
commit
1 parent 62b80c3 commit f056033

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Generates **millions of documents** at **maximum speed**, utilizing **all CPU th
1616

1717
### Features
1818

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).
2020
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.
2121
3. Document distribution across threads considering the remainder.
2222
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
3030

3131
<img src="https://raw.githubusercontent.com/AndrewShedov/turboMaker/refs/heads/main/assets/gif.gif" width="590" /><br>
3232
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.
3434

3535
<span id="screenshot_3"></span>
3636

@@ -39,7 +39,7 @@ PC configuration: i5-12600K, DDR4 80GB, SSD 980 PRO 1TB.
3939
<img src="https://raw.githubusercontent.com/AndrewShedov/turboMaker/refs/heads/main/assets/screenshot_3.png" width="640" /><br>
4040
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>
4141
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.
4343

4444
----------------------------------------
4545

@@ -76,11 +76,11 @@ npm i turbo-maker
7676
npm run turboMaker
7777
```
7878

79-
### Explanation of the file structure - turbo-maker.config.js.
79+
### Explanation of the file structure - turbo-maker.config.js
8080

8181
### Config options
8282

83-
Required fields must be specified:
83+
Required fields:
8484

8585
```js
8686
uri: 'mongodb://127.0.0.1:27017',
@@ -112,7 +112,7 @@ Accepts a <code>number</code> of documents per batch inserted into the database.
112112

113113
**timeStepMs**
114114

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>).
116116

117117
- 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.
118118

@@ -217,4 +217,8 @@ Simulation of [CRYSTAL v2.0](https://shedov.top/about-the-crystal-project/) oper
217217
</a>
218218
</p>
219219

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.
222+
223+
220224
[SHEDOV.TOP](https://shedov.top/) | [CRYSTAL](https://crysty.ru/AndrewShedov) | [Discord](https://discord.gg/ENB7RbxVZE) | [Telegram](https://t.me/ShedovChannel) | [X](https://x.com/AndrewShedov) | [VK](https://vk.com/shedovchannel) | [VK Video](https://vkvideo.ru/@shedovchannel) | [YouTube](https://www.youtube.com/@AndrewShedov)

config examples/Parallel Computation Benchmark/turbo-maker.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ Parallel Computation Benchmark
44
-----
55
Testing the performance of Node.js in multi-threaded computation tasks, evaluating language efficiency, thread utilization, CPU capabilities, and I/O operations with MongoDB.
66
7-
Adjust the value - 'generateLongString(100)', to regulate the load.
7+
Adjust the value - 'generateLongString(500)', to regulate the load.
88
-----
99
*/
1010

1111
export const config = {
1212
uri: 'mongodb://127.0.0.1:27017',
13-
db: 'crystalTest',
13+
db: 'crystal',
1414
collection: 'posts',
1515
numberThreads: 'max',
1616
numberDocuments: 1_000_000,
@@ -35,6 +35,6 @@ export function generateLongString(length) {
3535
export async function generatingData() {
3636

3737
return {
38-
complexString: generateLongString(100),
38+
complexString: generateLongString(500),
3939
};
4040
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "turbo-maker",
3-
"version": "1.0.30",
3+
"version": "1.0.31",
44
"description": "Super-fast multi-threaded document generator for MongoDB, operating through CLI.",
55
"main": "./src/index.js",
66
"exports": {

0 commit comments

Comments
 (0)