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): for i, size in enumerate(sizes):
# We set ``0`` for ``start`` and handle setting the actual # We set ``0`` for ``start`` and handle setting the actual
# ``start`` in ``HTTPUploader`` to get better measurements # ``start`` in ``HTTPUploader`` to get better measurements
data = HTTPUploaderData(size, 0, self.config['length']['upload'])
data._create_data()
requests.append( requests.append(
( (
build_request( build_request(self.best['url'], data),
self.best['url'],
HTTPUploaderData(size, 0,
self.config['length']['upload'])
),
size size
) )
) )