
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
github.com/idealo/mongodb-benchmarking
mongo-bench
is a high-performance benchmarking tool written in Golang designed to test and measure
MongoDB insert, update, delete, and upsert rates under configurable conditions.
This tool is useful for database engineers, developers, and system administrators who want to assess MongoDB
performance by simulating multiple threads performing operations in a MongoDB collection.
After building the tool, run it with customizable parameters:
./mongo-bench -threads <number_of_threads> -docs <number_of_documents> -uri <mongodb_uri> -type <test_type>
-threads
: Number of concurrent threads to use for inserting, updating, deleting, or upserting documents.-docs
: Total number of documents to process during the benchmark.-duration
: Duration of the test in seconds (default: 0 seconds).-largeDocs
: Use large documents (2K) (default: false).-dropDb
: Drop the database before running the test (default: true).-uri
: MongoDB connection URI.-type
: Type of test to run. Accepts insert
, update
, delete
, upsert
, or runAll
:
insert
: The tool will insert new documents.update
: The tool will update existing documents (requires that documents have been inserted in a prior run).delete
: The tool will delete existing documents. (just if docs
is given)upsert
: The tool will perform upserts, repeatedly updating a specified range. (just if docs
is given)runAll
: Runs the insert
, update
, delete
, and upsert
tests sequentially. (just if docs
is given)runAll
: Runs the insert
, update
tests sequentially. (just if duration
is given)./mongo-bench -threads 10 -docs 100000 -uri mongodb://localhost:27017 -type insert
This command will insert 100,000 documents into MongoDB using 10 concurrent threads.
./mongo-bench -threads 10 -docs 100000 -uri mongodb://localhost:27017 -type update
This command will update the 100,000 documents previously inserted using 10 concurrent threads.
./mongo-bench -threads 10 -docs 100000 -uri mongodb://localhost:27017 -type delete
This command will delete documents from MongoDB using 10 concurrent threads.
./mongo-bench -threads 10 -docs 100000 -uri mongodb://localhost:27017 -type upsert
This command will perform upserts on documents within a specified range, using 10 concurrent threads.
./mongo-bench -threads 10 -docs 100000 -uri mongodb://localhost:27017 --runAll
This command will run the insert
, update
, delete
, and upsert
tests sequentially using 10 concurrent threads.
benchmark_results_insert.csv
, benchmark_results_update.csv
) with columns:
t
: Timestamp (epoch seconds)count
: Total document countmean
: Mean operation rate in docs/secm1_rate
, m5_rate
, m15_rate
: Moving average rates over 1, 5, and 15 minutes, respectivelymean_rate
: Cumulative mean rateThis CSV file provides an in-depth view of performance over time, which can be used for analysis or visualizations.
t,count,mean,m1_rate,m5_rate,m15_rate,mean_rate
1730906793,100000,30000.50,31000.12,30500.45,30000.25,29900.88
Build the tool using the provided Makefile:
make build
This project is licensed under the MIT License.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.