You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"parallel async read with 1 parallel requests took 0.616163969039917 seconds\nparallel async read with 2 parallel requests took 0.35162997245788574 seconds"
93
+
]
94
+
},
95
+
{
96
+
"name": "stdout",
97
+
"output_type": "stream",
98
+
"text": [
99
+
"\nparallel async read with 3 parallel requests took 0.2948617935180664 seconds"
100
+
]
101
+
},
102
+
{
103
+
"name": "stdout",
104
+
"output_type": "stream",
105
+
"text": [
106
+
"\nparallel async read with 4 parallel requests took 0.26516294479370117 seconds"
107
+
]
108
+
},
109
+
{
110
+
"name": "stdout",
111
+
"output_type": "stream",
112
+
"text": [
113
+
"\nparallel async read with 5 parallel requests took 0.24994611740112305 seconds"
114
+
]
115
+
},
116
+
{
117
+
"name": "stdout",
118
+
"output_type": "stream",
119
+
"text": [
120
+
"\nparallel async read with 6 parallel requests took 0.24745702743530273 seconds"
121
+
]
122
+
},
123
+
{
124
+
"name": "stdout",
125
+
"output_type": "stream",
126
+
"text": [
127
+
"\nparallel async read with 7 parallel requests took 0.23832011222839355 seconds"
128
+
]
129
+
},
130
+
{
131
+
"name": "stdout",
132
+
"output_type": "stream",
133
+
"text": [
134
+
"\nparallel async read with 8 parallel requests took 0.23779797554016113 seconds"
135
+
]
136
+
},
137
+
{
138
+
"name": "stdout",
139
+
"output_type": "stream",
140
+
"text": [
141
+
"\nparallel async read with 9 parallel requests took 0.23258399963378906 seconds"
142
+
]
143
+
},
144
+
{
145
+
"name": "stdout",
146
+
"output_type": "stream",
147
+
"text": [
148
+
"\nparallel async read with 10 parallel requests took 0.231536865234375 seconds"
149
+
]
150
+
},
151
+
{
152
+
"name": "stdout",
153
+
"output_type": "stream",
154
+
"text": [
155
+
"\nparallel async read with 11 parallel requests took 0.22452688217163086 seconds"
156
+
]
157
+
},
158
+
{
159
+
"name": "stdout",
160
+
"output_type": "stream",
161
+
"text": [
162
+
"\nparallel async read with 12 parallel requests took 0.2237100601196289 seconds"
163
+
]
164
+
},
165
+
{
166
+
"name": "stdout",
167
+
"output_type": "stream",
168
+
"text": [
169
+
"\nparallel async read with 13 parallel requests took 0.21818184852600098 seconds"
170
+
]
171
+
},
172
+
{
173
+
"name": "stdout",
174
+
"output_type": "stream",
175
+
"text": [
176
+
"\nparallel async read with 14 parallel requests took 0.21832585334777832 seconds"
177
+
]
178
+
},
179
+
{
180
+
"name": "stdout",
181
+
"output_type": "stream",
182
+
"text": [
183
+
"\nparallel async read with 15 parallel requests took 0.22688078880310059 seconds"
184
+
]
185
+
},
186
+
{
187
+
"name": "stdout",
188
+
"output_type": "stream",
189
+
"text": [
190
+
"\nparallel async read with 16 parallel requests took 0.22031497955322266 seconds"
191
+
]
192
+
},
193
+
{
194
+
"name": "stdout",
195
+
"output_type": "stream",
196
+
"text": [
197
+
"\nparallel async read with 17 parallel requests took 0.22269797325134277 seconds"
198
+
]
199
+
},
200
+
{
201
+
"name": "stdout",
202
+
"output_type": "stream",
203
+
"text": [
204
+
"\nparallel async read with 18 parallel requests took 0.22491192817687988 seconds"
205
+
]
206
+
},
207
+
{
208
+
"name": "stdout",
209
+
"output_type": "stream",
210
+
"text": [
211
+
"\nparallel async read with 19 parallel requests took 0.21470904350280762 seconds"
212
+
]
213
+
},
214
+
{
215
+
"name": "stdout",
216
+
"output_type": "stream",
217
+
"text": [
218
+
"\n"
219
+
]
220
+
}
221
+
],
222
+
"source": [
223
+
"for chunk_size in range(1, 20):\n",
224
+
" with timer('parallel async read with {} parallel requests'.format(chunk_size)):\n",
225
+
" futures = [col.find_one({'abc': i})]\n",
226
+
" for i in range(N // chunk_size):\n",
227
+
" # interesting part:\n",
228
+
" futures = [col.find_one({'abc': (i * chunk_size) + j})\n",
0 commit comments