{"id":14956570,"url":"https://github.com/mongodb/mongo-perf","last_synced_at":"2025-11-11T21:09:09.315Z","repository":{"id":809153,"uuid":"404397","full_name":"mongodb/mongo-perf","owner":"mongodb","description":"performance tools for mongodb","archived":false,"fork":false,"pushed_at":"2024-05-29T11:28:28.000Z","size":4592,"stargazers_count":356,"open_issues_count":20,"forks_count":139,"subscribers_count":153,"default_branch":"master","last_synced_at":"2025-03-28T10:08:19.996Z","etag":null,"topics":[],"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/mongodb.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}},"created_at":"2009-12-07T20:29:03.000Z","updated_at":"2025-03-25T09:49:25.000Z","dependencies_parsed_at":"2024-03-22T23:34:13.854Z","dependency_job_id":"a2c8267d-167b-410e-967d-41b309264fb5","html_url":"https://github.com/mongodb/mongo-perf","commit_stats":{"total_commits":847,"total_committers":87,"mean_commits":9.735632183908047,"dds":0.7154663518299882,"last_synced_commit":"f2935c5dcc7b186b9ed46af6e16590003e0ac255"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-perf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-perf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-perf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-perf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/mongo-perf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166168,"owners_count":20894654,"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-09-24T13:13:09.272Z","updated_at":"2025-11-11T21:09:04.277Z","avatar_url":"https://github.com/mongodb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MONGO-PERF:\n\nMongo-perf (not to be confused with mongoperf) is a micro benchmarking tool for the MongoDB server. It measures throughput of commands with regards to the number of threads.\n\n**NOTE: this tool is primarily for internal use by MongoDB's performance testing ecosystem. It is not supported for users outside MongoDB. Use at your own risk.**\n\n### OVERVIEW:\nThis repo contains scripts to run benchmark tests for MongoDB.\n\n### DEPENDENCIES:\nSince 6.0, the legacy \"mongo\" shell has been replaced with \"mongosh\" which does not support benchRun(). To run this micro benchmark with MongoDB 6.0 you'll also need to download the 5.0 legacy \"mongo\" shell and ensure it's in your path. The legacy mongo shell is no longer officially supported for use with the MongoDB server, so there is no guarantee of forwards compatibility between the 5.0 legacy shell and more recent versions of the MongoDB server.\n\n*General Benchmarking Dependencies*  \n* Python \u003e= 3.0  \n* mongo shell \u003e= 2.7.7-pre- (at revision 881b3a97fb5080b4e5d5ce11ad016da73ea23931 or newer)  \n\n*Installing Python Dependencies*\n`pip install -r requirements.txt`\n\n*Python Benchmarking Dependencies*  \n* argparse  \n\n*Python Reporting Dependencies*  \n* bottle  \n* pymongo  \n\n### HOW TO RUN:\n*To run a micro benchmarking test or tests:*  \n`python benchrun.py -f \u003clist of testfiles\u003e -t \u003clist of thread configs\u003e [-m \u003cnumber of dbs\u003e] [-s \u003cshell path\u003e]`  \n\nFor example, to run the `simple_insert.js` test case on 1, 2, and 4 threads, no multi-db and using the basic mongo shell:  \n`python benchrun.py -f testcases/simple_insert.js  -t 1 2 4`\n\nTo run the single test case 'Queries.Empty` on 1, 2, and 4 thread:\n`python benchrun.py -f testcases/* --includeFilter Queries.Empty -t 1 2 4`\n\n\nTo run all insert and update test cases on 1, 2, and 4 threads, for 10\nseconds each using the basic mongo shell:  \n`python benchrun.py -f testcases/* -t 1 2 4 --includeFilter insert update --trialTime 10`\n\nTo run all insert and update test cases that are also have the tag\ncore on 1, 2, and 4 threads, for 10\nseconds each using the basic mongo shell:  \n`python benchrun.py -f testcases/* -t 1 2 4 --includeFilter insert update --includeFilter core --trialTime 10`\n\nFor a complete list of options :  \n`python benchrun.py --help`\n\n### RESULT CHANGES\n\nMongo-perf is built upon the Mongo shell benchrun command. The results\nformat of benchrun changed in Mongo 3.1.5 and 3.0.5. Because of the\nresult changes, mongo-perf results from before 3.1.5 or 3.0.5 may not\nbe directly comparable to results after 3.1.5 or 3.0.5.\n\nAs of Mongo 3.1.5 and 3.0.5 the benchrun command measures op performance on the client side,\ninstead of on the server side. Any and only those ops passed into the op array of the benchrun\ncommand are counted as ops for the purpose of reporting throughput. In some cases this may cause\nthe reported throughput to be higher than previous version of mongo-perf (for instance, if the\n\"let\" operation is used), or lower than before (for instance, if the shell issues getMore commands\nin addition to a query in order to complete an op).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-perf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fmongo-perf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-perf/lists"}