diff --git a/.evergreen/run-perf-tests.sh b/.evergreen/run-perf-tests.sh index 41f154b73..cdf598c3b 100644 --- a/.evergreen/run-perf-tests.sh +++ b/.evergreen/run-perf-tests.sh @@ -22,7 +22,7 @@ pip install simplejson python setup.py build_ext -i start_time=$(date +%s) -python test/performance/perf_test.py +python test/performance/perf_test.py --locals end_time=$(date +%s) elapsed_secs=$((end_time-start_time)) diff --git a/test/performance/perf_test.py b/test/performance/perf_test.py index 4a2ba2fea..9f6e268df 100644 --- a/test/performance/perf_test.py +++ b/test/performance/perf_test.py @@ -399,7 +399,7 @@ def insert_json_file_with_file_id(filename): def read_json_file(filename): coll = proc_client.perftest.corpus - temp = tempfile.TemporaryFile() + temp = tempfile.TemporaryFile(mode='w') try: temp.writelines( [json.dumps(doc) + '\n' for