{"id":36457085,"url":"https://github.com/devodev/mongoperf","last_synced_at":"2026-01-11T23:05:14.289Z","repository":{"id":64306334,"uuid":"257780593","full_name":"devodev/mongoperf","owner":"devodev","description":"A CLI for running performance tests against a MongoDB cluster.","archived":false,"fork":false,"pushed_at":"2020-04-30T17:16:36.000Z","size":63,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T06:28:18.057Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/devodev.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}},"created_at":"2020-04-22T03:24:13.000Z","updated_at":"2024-04-19T08:42:41.000Z","dependencies_parsed_at":"2023-01-15T10:45:22.402Z","dependency_job_id":null,"html_url":"https://github.com/devodev/mongoperf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/devodev/mongoperf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devodev%2Fmongoperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devodev%2Fmongoperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devodev%2Fmongoperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devodev%2Fmongoperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devodev","download_url":"https://codeload.github.com/devodev/mongoperf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devodev%2Fmongoperf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28326196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-11T23:05:14.222Z","updated_at":"2026-01-11T23:05:14.283Z","avatar_url":"https://github.com/devodev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongoperf\n`mongoperf` provides a CLI for running predefined scenarios against a mongodb database and report performance statistics.\n\n## Overview\n`mongoperf` provides a CLI for running predefined scenarios against a mongodb database and report performance statistics.\n\nCurrently, **`mongoperf` requires Go version 1.13 or greater**.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Development](#development)\n- [Build](#build)\n- [CLI](#cli)\n  - [Usage](#usage)\n\n## Development\nYou can use the provided `Dockerfile` to build an image that will provide a clean environment for development purposes.\u003c/br\u003e\nInstructions that follow assumes you are running `Windows`, have `Docker Desktop` installed and its daemon is running.\n\nClone this repository and build the image\n```\n$ git clone https://github.com/devodev/mongoperf\n$ cd ./mongoperf\n$ docker build --tag=mongoperf .\n```\n\nRun a container using the previously built image while mounting the CWD\n```\n$ docker run \\\n    --rm \\\n    --volume=\"$(pwd -W):/srv/src/github.com/devodev/mongoperf\" \\\n    --tty \\\n    --interactive \\\n    mongoperf\n$ root@03e67598a37f:/srv/src/github.com/devodev/mongoperf#\n```\n\nStart deving\n```\n$ go run ./cmd/mongoperf\n```\n\n### Build\nBuild the CLI for a target platform (Go cross-compiling feature), for example linux, by executing:\n```\n$ mkdir $HOME/src\n$ cd $HOME/src\n$ git clone https://github.com/devodev/mongoperf.git\n$ cd mongoperf\n$ env GOOS=linux go build -o mongoperf_linux ./cmd/mongoperf\n```\nIf you are a Windows user, substitute the $HOME environment variable above with %USERPROFILE%.\n\n## CLI\n### Usage\n```\nRun performance tests scenarios on a mongodb instance or cluster.\n\nUsage:\n  mongoperf [command]\n\nAvailable Commands:\n  demo        Run small demo that inserts, update and delete entries.\n  help        Help about any command\n  scenario    Run a scenario.\n\nFlags:\n  -h, --help      help for mongoperf\n      --version   version for mongoperf\n\nUse \"mongoperf [command] --help\" for more information about a command.\n```\n\n### Scenario Command\nTakes in a scenario configuration file and runs it.\u003c/br\u003e\nQueries are sent to workers sequentially.\n\n#### Schema\nThe current schema is represented using a yaml configuration file.\u003c/br\u003e\nIt contains a single Scenario object containing configuration attributes as well as query definitions.\u003c/br\u003e\nHere is an example:\n```\n---\nDatabase: test\nCollection: test\nParallel: 2\nBufferSize: 1000\nRepeat: 1000\nQueries:\n- Name: testmany\n  Action: InsertMany\n  Meta:\n    Data:\n    - Name: Ash\n      Age: 10\n      City: Pallet Town\n    - Name: Misty\n      Age: 10\n      City: Cerulean City\n```\n\nA scenario declares the following attributes:\n- Database (string)\n  - A MongoDB database name.\n- Collection (string)\n  - A MongoDB collection name.\n- Parallel (int, optional) (default: 1)\n  - The number of parallel workers to process queries.\n  - Must be greater than 0.\n- BufferSize (int, optional) (default: 1000)\n  - The size of the worker task queue.\n  - Must be greater than or equal to 0.\n  - If 0, default value is set (1000).\n- Repeat (int, optional) (default: 1)\n  - How many times should we run the queries.\n  - Must be greater than or equal to 0.\n  - If 0, repeats indefinitely.\n- Queries (List\u003cQuery\u003e)\n  - Must contain at least one Query definition.\n\nA `Scenario` also declares a `Queries` attribute, which is a list of `Query` definition.\n```\n---\n...escaped\nQueries:\n- Name: test\n  Action: InsertMany\n  Meta:\n...escaped\n```\nA query declares the following attributes:\n- Name (string)\n  - Used as an identifier for the query.\n- Action (string)\n  - Defines the action to perform against a collection. Available are:\n    - InsertOne\n    - InsertMany\n    - UpdateOne\n    - FindOne\n    - Find\n- Meta (Meta)\n  - An object specific to the Action provided.\n\nA `Query` also declares a `Meta` object which contains the payload specific attributes required by the specified Action attriobte.\n```\n---\n...escaped\nQueries:\n...escaped\n  Meta:\n    Data:\n    - Name: Ash\n      Age: 10\n      City: Pallet Town\n    - Name: Misty\n      Age: 10\n      City: Cerulean City\n    Options:\n      Ordered: true\n```\n\nHere is a list of schema used for each Action\n\nInsertOne\n  - Data (map)\n    - A map of key/values representing the document to insert.\n  - Options (map, optional)\n    - A map of key/values correspongind to the InsertOneOptions type.\n      - BypassDocumentValidation (bool)\n\nInsertMany\n  - Data (List\u003cmap\u003e)\n    - A list of map of key/values representing the documents to insert.\n  - Options (map, optional)\n    - A map of key/values correspongind to the InsertManyOptions type.\n      - BypassDocumentValidation (bool)\n      - Ordered (bool)\n\nUpdateOne\n  - Data (map)\n    - A map of key/values representing a document containing update operators.\n  - Filter (map)\n    - A map of key/values representing the filter to apply.\n  - Options (map, optional)\n    - A map of key/values correspongind to the UpdateOptions type.\n      - ArrayFilters (ArrayFilters)\n      - BypassDocumentValidation (bool)\n      - Ordered (bool)\n      - Collation (Collation)\n      - Upsert (bool)\n\nFindOne\n  - Filter (map)\n    - A map of key/values representing the filter to apply.\n  - Options (map, optional)\n    - A map of key/values correspongind to the UpdateOptions type.\n      - AllowPartialResults (bool)\n      - BatchSize (int)\n      - Collation (Collation)\n      - Comment (string)\n      - CursorType (CursorType)\n      - Hint (string | map)\n      - Max (map)\n      - MaxAwaitTime (duration)\n      - MaxTime (duration)\n      - Min (map)\n      - NoCursorTimeout (bool)\n      - OplogReplay (bool)\n      - Projection (map)\n      - ReturnKey (bool)\n      - ShowRecordID (bool)\n      - Skip (int)\n      - Snapshot (bool)\n      - Sort (map)\n\nFind\n  - Filter (map)\n    - A map of key/values representing the filter to apply.\n  - Options (map, optional)\n    - A map of key/values correspongind to the UpdateOptions type.\n      - AllowPartialResults (bool)\n      - BatchSize (int)\n      - Collation (Collation)\n      - Comment (string)\n      - CursorType (CursorType)\n      - Hint (string | map)\n      - Limit (int)\n      - Max (map)\n      - MaxAwaitTime (duration)\n      - MaxTime (duration)\n      - Min (map)\n      - NoCursorTimeout (bool)\n      - OplogReplay (bool)\n      - Projection (map)\n      - ReturnKey (bool)\n      - ShowRecordID (bool)\n      - Skip (int)\n      - Snapshot (bool)\n      - Sort (map)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevodev%2Fmongoperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevodev%2Fmongoperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevodev%2Fmongoperf/lists"}