Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JMeter extension for comparing the relative performance of MongoDB scripts
Java
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
out/artifacts/mongometer_jar
src
target
.gitignore
MongoDB Source Config.jmx
README.txt
Screenshot MongoDB Source Config.jmx.png
changelog.txt
mongometer.iml
pom.xml

README.txt

To quickstart, just check everything is hanging together.

Copy across the jars
mongometer.jar lives in out/artifacts
Ensure you have mongometer.jar and the mongo java driver jar in /usr/lib/jmeter/2.8/lib/ext
It's a java7, 64-bit linux build (just in case you have any issues)

Start up mongodb
/usr/lib/mongodb/2.0.6/bin/mongod --dbpath /data/db --logpath /data/db/mongod.log

Start up a shell
$cd /usr/lib/mongodb/2.0.6/bin/
$./mongo

Set the logging level in jmeter.properties
#log_level.jan=DEBUG
log_level.jan.mongometer.config=DEBUG
#log_level.jan.mongometer.mongo=DEBUG
#log_level.jan.mongometer.sampler=DEBUG


Inside /usr/lib/jmeter/2.8/lib/ext/ApacheJMeter_core.jar
Edit this
/org/apache/jmeter/resources/messages.properties
Change Line 682
from
property_tool_tip={0}\: {1}
to
property_tool_tip=<html><b>{0}</b><br><br>{1}</html>

Start up jmeter
/usr/lib/jmeter/2.8/bin/jmeter.sh

Add a ThreadGroup
Add MongoDB Sampler to the ThreadGroup
Add View Result Tree Listener to ThreadGroup

Server Address List
127.0.0.1

Database
jmeter

Example Script
Insert
db.jmeter.insert({"jan":"the great"})

Count
function() {return db.jmeter.find().count();}

Find
function() {return db.jmeter.find().toArray();}

Hit Go

In the shell
>use jmeter
>db.jmeter.find()

Something went wrong with that request. Please try again.