Pre create upload data, to not impact timing

This commit is contained in:
Matt Martz 2016-11-04 16:05:57 -05:00
parent 91270dbc67
commit 6685d91729
1 changed files with 3 additions and 5 deletions

View File

@ -1079,13 +1079,11 @@ class Speedtest(object):
for i, size in enumerate(sizes):
# We set ``0`` for ``start`` and handle setting the actual
# ``start`` in ``HTTPUploader`` to get better measurements
data = HTTPUploaderData(size, 0, self.config['length']['upload'])
data._create_data()
requests.append(
(
build_request(
self.best['url'],
HTTPUploaderData(size, 0,
self.config['length']['upload'])
),
build_request(self.best['url'], data),
size
)
)