Do better calculations of the number of uploads per size to perform
This commit is contained in:
		
							parent
							
								
									3c1c9d3179
								
							
						
					
					
						commit
						401c469991
					
				
							
								
								
									
										10
									
								
								speedtest.py
								
								
								
								
							
							
						
						
									
										10
									
								
								speedtest.py
								
								
								
								
							|  | @ -808,8 +808,12 @@ class Speedtest(object): | ||||||
|                          3000, 3500, 4000] |                          3000, 3500, 4000] | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         size_count = len(sizes['upload']) | ||||||
|  | 
 | ||||||
|  |         upload_count = int(math.ceil(upload_max / size_count)) | ||||||
|  | 
 | ||||||
|         counts = { |         counts = { | ||||||
|             'upload': int(upload_max * 2 / len(sizes['upload'])), |             'upload': upload_count, | ||||||
|             'download': int(download['threadsperurl']) |             'download': int(download['threadsperurl']) | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -830,11 +834,13 @@ class Speedtest(object): | ||||||
|             'counts': counts, |             'counts': counts, | ||||||
|             'threads': threads, |             'threads': threads, | ||||||
|             'length': length, |             'length': length, | ||||||
|             'upload_max': upload_max |             'upload_max': upload_count * size_count | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|         self.lat_lon = (float(client['lat']), float(client['lon'])) |         self.lat_lon = (float(client['lat']), float(client['lon'])) | ||||||
| 
 | 
 | ||||||
|  |         printer(self.config, debug=True) | ||||||
|  | 
 | ||||||
|         return self.config |         return self.config | ||||||
| 
 | 
 | ||||||
|     def get_servers(self, servers=None): |     def get_servers(self, servers=None): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue