From 746e392c5769ab2712508dc7ff7aadea6f185d31 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Feb 17 2021 03:53:06 +0000 Subject: Added thread count display on progress bars Signed-off-by: Akashdeep Dhar --- diff --git a/testdata.py b/testdata.py index d7806f1..3d0cdd0 100644 --- a/testdata.py +++ b/testdata.py @@ -265,10 +265,11 @@ def mainfunc(strmsize): [65536, 131072, 196608, 262144, 327680, 393216, 458752, 524288, 589824, 655360, 720896, 786432, 851968, 917504, 983040, 1048576, 1114112, 1179648, 1245184, 1310720, 1376256, 1441792, 1507328, 1572864, 1638400, 1703936, 1769472, 1835008, 1900544, 1966080, 2031616, 2097152] SCHEMA {strmsize}.csv > {thrdqant}, {duration}, {sha256hx} """ + strmsize = int(strmsize) fileloca = "https://speed.hetzner.de/100MB.bin" - with open(str(strmsize)+".csv", "w") as fileobjc: - fileobjc.write("") - for thrdqant in range(1, 513, 1): + #with open(str(strmsize)+".csv", "w") as fileobjc: + #fileobjc.write("") + for thrdqant in range(246, 513, 1): if thrdqant == 1: downobjc = Singload(fileloca, strmsize) elif 512 >= thrdqant > 1: diff --git a/thrd.py b/thrd.py index 9c10ebe..cd6e59a 100644 --- a/thrd.py +++ b/thrd.py @@ -33,12 +33,9 @@ from hashlib import sha256 """ Notification Slugs -WARNING -FAILURE -SUCCESS -DETAILS PROPERTY RECEIVED +ACQUIRED PATIENCE COMPLETE STARTING @@ -217,8 +214,17 @@ class Multload: click.echo(Textface().failmesg("COLLAPSE", str(expt))) exit() + def frmtqant(self, thrdindx): + if thrdindx in range(0, 10): + return "00" + str(thrdindx) + elif thrdindx in range(10, 100): + return "0" + str(thrdindx) + elif thrdindx in range(100, 1000): + return str(thrdindx) + def thrdpull(self, qantindx, byternge): try: + thrdhead = "PART#" + self.frmtqant(qantindx) partsize = byternge[1] - byternge[0] thrdrqst = self.httpobjc.request( "GET", @@ -238,7 +244,7 @@ class Multload: partresp += filepeic progelem.set_description( Textface().specmesg( - "RECEIVED" + thrdhead ) ) progelem.update(len(filepeic))