Do better calculations of the number of uploads per size to perform

This commit is contained in:
Matt Martz 2017-04-25 10:08:14 -05:00
parent 3c1c9d3179
commit 401c469991
1 changed files with 8 additions and 2 deletions

View File

@ -808,8 +808,12 @@ class Speedtest(object):
3000, 3500, 4000]
}
size_count = len(sizes['upload'])
upload_count = int(math.ceil(upload_max / size_count))
counts = {
'upload': int(upload_max * 2 / len(sizes['upload'])),
'upload': upload_count,
'download': int(download['threadsperurl'])
}
@ -830,11 +834,13 @@ class Speedtest(object):
'counts': counts,
'threads': threads,
'length': length,
'upload_max': upload_max
'upload_max': upload_count * size_count
})
self.lat_lon = (float(client['lat']), float(client['lon']))
printer(self.config, debug=True)
return self.config
def get_servers(self, servers=None):