diff options
author | Kelsey Schubert <kelsey@mongodb.com> | 2018-03-13 21:46:52 -0400 |
---|---|---|
committer | Kelsey Schubert <kelsey@mongodb.com> | 2018-03-13 21:47:00 -0400 |
commit | 0c1402ee3f10eaf9d6d989d814bc3113a380091e (patch) | |
tree | a04b6f7f04fb12f4bd2e5549064458eef761d4b3 /src/mongo/gotools | |
parent | 6345c3a6e9681e586bccf32aa2d5a6e8652f4e26 (diff) | |
download | mongo-0c1402ee3f10eaf9d6d989d814bc3113a380091e.tar.gz |
Import tools: 61fe01cbc76d2e9f9a9c918e592648dfdb646eff from branch masterr3.7.3
ref: 217a496327..61fe01cbc7
for: 3.7.3
TOOLS-1969 Set mongoreplay play host via environment variable
Diffstat (limited to 'src/mongo/gotools')
-rw-r--r-- | src/mongo/gotools/import.data | 2 | ||||
-rw-r--r-- | src/mongo/gotools/mongoreplay/play.go | 2 | ||||
-rwxr-xr-x | src/mongo/gotools/mongoreplay/sanity_check.sh | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/gotools/import.data b/src/mongo/gotools/import.data index 9ab7a82fe22..ecaeec3bde0 100644 --- a/src/mongo/gotools/import.data +++ b/src/mongo/gotools/import.data @@ -1,5 +1,5 @@ { - "commit": "217a4963272b01dbdc951f626eaccb4ec9d09f59", + "commit": "61fe01cbc76d2e9f9a9c918e592648dfdb646eff", "github": "mongodb/mongo-tools.git", "vendor": "tools", "branch": "master" diff --git a/src/mongo/gotools/mongoreplay/play.go b/src/mongo/gotools/mongoreplay/play.go index 6eb3617f874..b2a617c5db4 100644 --- a/src/mongo/gotools/mongoreplay/play.go +++ b/src/mongo/gotools/mongoreplay/play.go @@ -20,7 +20,7 @@ type PlayCommand struct { StatOptions PlaybackFile string `description:"path to the playback file to play from" short:"p" long:"playback-file" required:"yes"` Speed float64 `description:"multiplier for playback speed (1.0 = real-time, .5 = half-speed, 3.0 = triple-speed, etc.)" long:"speed" default:"1.0"` - URL string `short:"h" long:"host" description:"Location of the host to play back against" default:"mongodb://localhost:27017"` + URL string `short:"h" long:"host" env:"MONGOREPLAY_HOST" description:"Location of the host to play back against" default:"mongodb://localhost:27017"` Repeat int `long:"repeat" description:"Number of times to play the playback file" default:"1"` QueueTime int `long:"queueTime" description:"don't queue ops much further in the future than this number of seconds" default:"15"` NoPreprocess bool `long:"no-preprocess" description:"don't preprocess the input file to premap data such as mongo cursorIDs"` diff --git a/src/mongo/gotools/mongoreplay/sanity_check.sh b/src/mongo/gotools/mongoreplay/sanity_check.sh index 74a4cf49c6b..c4697b2805e 100755 --- a/src/mongo/gotools/mongoreplay/sanity_check.sh +++ b/src/mongo/gotools/mongoreplay/sanity_check.sh @@ -50,7 +50,8 @@ fi mongo --port=$PORT mongoplay_test --eval "db.setProfilingLevel(2);" mongo --port=$PORT mongoplay_test --eval "db.createCollection('sanity_check', {});" -mongoreplay play --host mongodb://localhost:$PORT -p $OUTFILE +export MONGOREPLAY_HOST="mongodb://localhost:$PORT" +mongoreplay play -p $OUTFILE mongo --port=$PORT mongoplay_test --eval "var profile_results = db.system.profile.find({'ns':'mongoplay_test.sanity_check'}); assert.gt(profile_results.size(), 0);" |