Skip to content

Commit 09dbece

Browse files
committed
Remove TOTALs
1 parent 4853245 commit 09dbece

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

pymongo/asynchronous/network.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363

6464
_IS_SYNC = False
6565

66-
TOTAL = []
67-
TOTAL_WRITE = []
68-
TOTAL_READ = []
66+
# TOTAL = []
67+
# TOTAL_WRITE = []
68+
# TOTAL_READ = []
6969
# print(f"TOTALS: {TOTAL, TOTAL_WRITE, TOTAL_READ}")
7070

7171

@@ -211,13 +211,13 @@ async def command_stream(
211211
read_start = time.monotonic()
212212
reply = await receive_message_stream(conn, request_id)
213213
read_elapsed = time.monotonic() - read_start
214-
if name == "insert":
215-
TOTAL.append(write_elapsed + read_elapsed)
216-
TOTAL_READ.append(read_elapsed)
217-
TOTAL_WRITE.append(write_elapsed)
218-
if name == "endSessions":
219-
print(
220-
f"AVERAGE READ: {statistics.mean(TOTAL_READ)}, AVERAGE WRITE: {statistics.mean(TOTAL_WRITE)}, AVERAGE ELAPSED: {statistics.mean(TOTAL)}")
214+
# if name == "insert":
215+
# TOTAL.append(write_elapsed + read_elapsed)
216+
# TOTAL_READ.append(read_elapsed)
217+
# TOTAL_WRITE.append(write_elapsed)
218+
# if name == "endSessions":
219+
# print(
220+
# f"AVERAGE READ: {statistics.mean(TOTAL_READ)}, AVERAGE WRITE: {statistics.mean(TOTAL_WRITE)}, AVERAGE ELAPSED: {statistics.mean(TOTAL)}")
221221
conn.more_to_come = reply.more_to_come
222222
unpacked_docs = reply.unpack_response(
223223
codec_options=codec_options, user_fields=user_fields

pymongo/asynchronous/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
_CURSOR_DOC_FIELDS = {"cursor": {"firstBatch": 1, "nextBatch": 1}}
6161

6262

63-
TOTAL = []
64-
TOTAL_WRITE = []
65-
TOTAL_READ = []
63+
# TOTAL = []
64+
# TOTAL_WRITE = []
65+
# TOTAL_READ = []
6666
# print(f"TOTALS: {TOTAL, TOTAL_WRITE, TOTAL_READ}")
6767

6868

0 commit comments

Comments
 (0)