Registry / database / turbo-maker

turbo-maker

JSON →
library1.0.64jsnpmunverified

turboMaker is a high-performance, multithreaded document generator for MongoDB that operates through a CLI. Version 1.0.64 focuses on speed, generating 1 million documents in approximately 7 seconds on typical hardware. It uses worker_threads, SharedArrayBuffer, and Atomics for parallel inserts across all CPU cores. Key differentiators include support for custom data schemas via a generatingData function, precise createdAt/updatedAt handling, batch inserts, and integration with superMaker for realistic random data. It is intended for stress testing MongoDB, creating large collections, and performance benchmarking. The package is maintained and released regularly.

npm install turbo-maker
INSTALL
IMPORT
SIG · TURBO-MAKER
T
turbo-maker
databasejavascriptv1.0.64
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

turboMaker (CLI)
npx turbo-maker
import turboMaker from 'turbo-maker'
turboMaker is a CLI tool, not a library. Do not attempt to import it as a module; use npx or add a script to package.json.
Configuration
Create a turbo-maker.config.js file in the project root.
Using require() or import to load the package itself
Configuration is done via a config file, not by importing the package. See examples at https://github.com/AndrewShedov/turboMaker/tree/main/config%20examples
superMaker functions (if used)
const { fText, fHashtag } = require('super-maker');
import { fText } from 'super-maker' (may work but CJS is safer for CLI contexts)
superMaker is an optional dependency for generating random data in your config. The package is CJS by default; use require() in your config file.

Minimal configuration to generate 1 million user documents using turboMaker with a custom data schema.

// 1. Install the package // npm i turbo-maker // 2. Create turbo-maker.config.js in project root: module.exports = { uri: process.env.MONGO_URI || 'mongodb://localhost:27017', databaseName: 'test', collectionName: 'users', documentsCount: 1000000, threadCount: 4, // or 'max' for all cores batchSize: 1000, generatingData: () => ({ name: `User${Math.random().toString(36).slice(2, 8)}`, email: `user${Date.now()}@example.com`, createdAt: new Date(), active: true, }), timeStepMs: 1, clearCollectionBefore: false, }; // 3. Add script in package.json: // "scripts": { "turboMaker": "turbo-maker" } // 4. Run: // npm run turboMaker
Debug
Known issues
gotchaWhen generating more than 10,000,000 documents, speed may decrease periodically due to I/O and MongoDB overhead.
fix
Consider increasing batchSize or reducing threadCount to manage I/O load.
affects: <=1.0.64
gotchaThe package uses worker_threads and SharedArrayBuffer; ensure your Node.js version supports them (Node.js 12+).
fix
Use Node.js >=12. If using Node.js 10 or lower, upgrade.
affects: <=1.0.64
gotchaDo not import turboMaker as a JavaScript module; it is a CLI tool and not designed for programmatic use.
fix
Use npx turbo-maker or a script in package.json to run it from the command line.
affects: <=1.0.64
gotchaConfiguration file must be named exactly 'turbo-maker.config.js' and be in the project root.
fix
Rename the configuration file to 'turbo-maker.config.js' and ensure it is in the root directory of your project.
affects: <=1.0.64
gotchaWhen setting threadCount to 'max', it will use all available CPU threads. On high-core machines, this may cause significant system load.
fix
Set threadCount to a specific number (e.g., half of available threads) to avoid overwhelming the system.
affects: <=1.0.64
Errors
Common errors & fixes
Error: Cannot find module 'super-maker'
The config file uses superMaker functions but super-maker is not installed.
fix
Run 'npm install super-maker' in your project directory.
Error: MongoNetworkError: connect ECONNREFUSED
MongoDB connection string is incorrect or MongoDB server is not running.
fix
Verify the 'uri' in turbo-maker.config.js and ensure MongoDB is accessible.
Warning: threadCount must be a positive integer or 'max'
Invalid value provided for threadCount in config.
fix
Set threadCount to a number >=1 or the string 'max'.
Upgrade
Version history
1.0.64latest on npm
Audit
Dependencies
super-makeroptionalUsed for generating random text, hashtags, words, dates, emails, URLs, etc. when using the integrated generatingData function.
Agent activity
19 hits · last 30 days
node
16
Meta
1
OpenAI (training)
1
Resources
turbo-maker — npm install turbo-maker · libregistry