PYTHON-2537 Fix benchmark when using Python 3 (#565)

This commit is contained in:
Shane Harvey 2021-02-03 13:16:18 -08:00 committed by GitHub
parent 7ca1efda43
commit 846e925280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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))

View File

@ -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