{"id":13480816,"url":"https://github.com/duckie/mongo_smasher","last_synced_at":"2026-01-29T01:08:46.204Z","repository":{"id":139105926,"uuid":"47941307","full_name":"duckie/mongo_smasher","owner":"duckie","description":"A small tool to generate randomized datasets","archived":false,"fork":false,"pushed_at":"2016-03-21T16:55:40.000Z","size":735,"stargazers_count":34,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T14:42:37.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duckie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-12-13T23:36:38.000Z","updated_at":"2024-05-26T18:15:04.000Z","dependencies_parsed_at":"2024-01-06T00:00:01.566Z","dependency_job_id":"e11e0a6d-176a-416e-9aef-e788c7e73ca2","html_url":"https://github.com/duckie/mongo_smasher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckie%2Fmongo_smasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckie%2Fmongo_smasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckie%2Fmongo_smasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckie%2Fmongo_smasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duckie","download_url":"https://codeload.github.com/duckie/mongo_smasher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245835979,"owners_count":20680303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T17:00:45.412Z","updated_at":"2026-01-29T01:08:46.124Z","avatar_url":"https://github.com/duckie.png","language":"C++","funding_links":[],"categories":["C++","Tools"],"sub_categories":["Administration"],"readme":"MongoDB Smasher\n==================\n\nThis project is a tool to fill up MongoDB databases with huge sets of randomized data to test your architecture and your data model performances.\n\n# How to build\n\nThe *only* local dependency is `boost`, be sure it is installed along with a modern C++ compiler and `cmake` then:\n\n\tgit clone https://github.com/duckie/mongo_smasher.git\n\tcd mongo_smasher\n\tgit submodule update --init --recursive\n\tmkdir build\n\tcd build\n\tcmake -DCMAKE_BUILD_TYPE:STRING=Release ../\n\tmake -j${number_of_machine_CPUs}\n\nThe generated executable is found as `mongo_smasher/build/src/mongo_smasher`. Optional:\n\n\tmake install\n\n**Tip**: Do not use more CPUs than your machine has with `make`or the compilation of the mongo C++11 driver could fail.\n\n**Tip**: If you use Windows, make yourself a favor and install [cash](https://github.com/dthree/cash).\n\n# How to use\n\n`mongo_smasher` must be fed a json file containing your collections and schemas. Check the `examples` directory. Here is one of them:\n\n    {\n      \"values\":{\n        \"id\":{\"type\":\"incremental_id\"},\n        \"restaurant_seed\":{\"type\":\"string\",\"min_size\":10,\"max_size\":150},\n        \"score\":{\"type\":\"int\",\"min\":-1,\"max\":131},\n        \"grade\":{\"type\":\"pick\", \"values\":[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"]},\n        \"grade_date\":{\"type\":\"date\",\"min\":\"2012-01-01 00:00:00\",\"max\":\"2016-02-29 00:00:00\"},\n        \"cuisine\":{\"type\":\"pick\",\"file\":\"ny/cuisines.txt\"},\n        \"nyzip\":{\"type\":\"pick\",\"file\":\"ny/zipcodes.txt\"},\n        \"nyst\":{\"type\":\"pick\",\"file\":\"ny/street-names.txt\"},\n        \"nybuilding\":{\"type\":\"pick\",\"file\":\"ny/buildings.txt\"},\n        \"borough\":{\"type\":\"pick\",\"values\":[\"Missing\",\"Queens\",\"Bronx\",\"Brooklyn\",\"Manhattan\" ,\"Staten Island\"]},\n        \"geo_x\":{\"type\":\"double\",\"min\":-28.0168595,\"max\":52.5388779},\n        \"geo_y\":{\"type\":\"double\",\"min\":-157.8887924,\"max\":153.1628795},\n        \"price\":{\"type\":\"double\",\"min\":1.0,\"max\":500.0},\n        \"firstname\":{\"type\":\"pick\",\"file\":\"dictionaries/first-names.txt\"},\n        \"lastname\":{\"type\":\"pick\",\"file\":\"dictionaries/names.txt\"}\n      },\n      \"collections\":{\n        \"restaurants\":{\n          \"schema\":{\n            \"address\":{\n              \"building\":\"$nybuilding\",\n              \"street\":\"$nyst\",\n              \"coord\":[\"$geo_x\",\"$geo_y\"],\n              \"zipcode\":\"$nyzip\"\n            },\n            \"borough\":\"$borough\",\n            \"cuisine?0.7\":\"$cuisine\",\n            \"grades[0:4]\":{\n              \"date\":\"$grade_date\",\n              \"grade\":\"$grade\",\n              \"score\":\"$score\"\n            },\n            \"name\":\"At $firstname $lastname's $cuisine $estaurant_seed\",\n            \"restaurant_id\":\"$id\"\n          },\n          \"actions\":{\n            \"insert\":{\n              \"bulk_size\":1000\n            }\n          }\n        }\n      }\n    }\n\nUse `--help` switch to get some details about command line options.\n\n# Contribute\n\nThe tool is in very active development. Any contribution is welcome.\n\nSome planned features:\n- Updates and finds\n- Oplog replayer \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckie%2Fmongo_smasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckie%2Fmongo_smasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckie%2Fmongo_smasher/lists"}