Last active
May 10, 2018 02:45
-
-
Save sarjarapu/b0398ebb501bf9c602af7eb3db3485ae to your computer and use it in GitHub Desktop.
A bash script to help you download, import and generate load on the sample restaurant database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# download and import the restaurant sample data set | |
wget https://raw.githubusercontent.com/mongodb/docs-assets/primer-dataset/primer-dataset.json | |
mongoimport --db guidebook --collection restaurants --type json --file ./primer-dataset.json | |
# download and run the load generation script | |
wget https://goo.gl/BXHH2d -O labs-performance-restaurant.js | |
mongo guidebook --eval "load('./labs-performance-restaurant.js');r.performReads();" > /dev/null 2>&1 & | |
# open mongo shell and practice all the above use cases for currentOp | |
mongo guidebook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment