{"id":16111237,"url":"https://github.com/vergissberlin/faker-example-javascript","last_synced_at":"2026-02-27T12:16:35.629Z","repository":{"id":43338861,"uuid":"301975229","full_name":"vergissberlin/faker-example-javascript","owner":"vergissberlin","description":"Real world example for big data creation with javascript. Running javascript in parallel processes.","archived":false,"fork":false,"pushed_at":"2026-02-26T07:01:40.000Z","size":315,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T12:10:38.468Z","etag":null,"topics":["faker","fakerjs","parallel-processing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vergissberlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-07T08:39:03.000Z","updated_at":"2025-08-29T12:30:47.000Z","dependencies_parsed_at":"2024-05-14T09:29:55.021Z","dependency_job_id":"6d572686-0fad-4ba7-b054-2967bd560883","html_url":"https://github.com/vergissberlin/faker-example-javascript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vergissberlin/faker-example-javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergissberlin%2Ffaker-example-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergissberlin%2Ffaker-example-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergissberlin%2Ffaker-example-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergissberlin%2Ffaker-example-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vergissberlin","download_url":"https://codeload.github.com/vergissberlin/faker-example-javascript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergissberlin%2Ffaker-example-javascript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29894302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["faker","fakerjs","parallel-processing"],"created_at":"2024-10-09T19:41:00.233Z","updated_at":"2026-02-27T12:16:34.631Z","avatar_url":"https://github.com/vergissberlin.png","language":"JavaScript","readme":"# fake data generator\n\n**Generate fake user data with JavaScript in parallel**\n\n\u003e In Node.js everything runs in parallel, except your code. What this means is that all I/O code that you write in Node.js is non-blocking, while (conversely) all non-I/O code that you write in Node.js is blocking.\n\n![Single thread](./docs/thread-single.png \"Waiting loong\")\n![Multi thread](./docs/thread-multi.png \"Go brrr\")\n\n## Using\n\n### Without Docker\n\nTo use this method, you need to install node \u003e= 14 on your local system fitst.\n\n```bash\nyarn\nyarn start\n```\n\n### With Docker\n\nTo use this method, you need to install Docker on your local system first.\n\n```bash\ndocker run -it -v $PWD:/app -w /app node yarn\ndocker run -it -v $PWD:/app -w /app node yarn start\n```\n\n### Configuration\n\n| Name             | Description                                     | Default value       |\n| ---------------- | ----------------------------------------------- | ------------------- |\n| TARGET_QUANTITY  | Quantatiy of fake data records to generate      | 500000              |\n| LINES_PER_FILE   | Data per csv file                               | 10000               |\n| WORKER_TYPE      | 'process' or 'thread'                           | process             |\n| WORKER_COUNT_MAX | The number of threads or child processes to use | Number of CPU cores |\n| DATA_TYPE        | 'user' or 'product'                             | product             |\n\nOne note to DATA_TYPE. Feel free to use 'user' or 'product' as long as you are generating fake\nuser data or fake product data. If you are generating fake product data, you should use 'product'\nas DATA_TYPE. You can find the types in the types folder. You can add your own types by adding a\nnew file to the types folder.\n\n### Examples\n\nRun with local node.js. You should have at least 4GB of free memory and node.js \u003e= 14 installed.\n\n```bash\nTARGET_QUANTITY=500000 LINES_PER_FILE=10000 WORKER_TYPE=thread yarn start\n```\n\nRun with Docker\n\n```bash\ndocker run -it -v $PWD:/app -w /app -e TARGET_QUANTITY=5000000 node yarn start\n```\n\n### Test with hyperfine\n\n[hyperfine](https://github.com/sharkdp/hyperfine) is a tool for running benchmark tests for CLI applications.\nLet's do a benchmark test with *hyperfine* for the *fake-data-generator* project.\n\n#### 20,000,000 test products with 10,000 products in each file\n\n```bash\nhyperfine -r 10 \\\n    -n \"Single thread\"   \"TARGET_QUANTITY=20000000 LINES_PER_FILE=10000 WORKER_TYPE=process WORKER_COUNT_MAX=1 yarn start\" \\\n    -n \"Worker threads\"  \"TARGET_QUANTITY=20000000 LINES_PER_FILE=10000 WORKER_TYPE=thread yarn start\" \\\n    -n \"Child processes\" \"TARGET_QUANTITY=20000000 LINES_PER_FILE=10000 WORKER_TYPE=process yarn start\"\n```\n\n## Wanna know more about?\n\nI wrote an article on medium about my journey in this topic.\nGo ahead! [https://medium.com/p/98b990967824]\n\n## Contributors\n\n- [André Lademann](https://github.com/vergissberlin)\n- [TheDevMinerTV](https://github.com/TheDevMinerTV)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvergissberlin%2Ffaker-example-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvergissberlin%2Ffaker-example-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvergissberlin%2Ffaker-example-javascript/lists"}