Fix printing
This commit is contained in:
@@ -12,7 +12,7 @@ import thread
|
|||||||
import basic_producer_consumer
|
import basic_producer_consumer
|
||||||
|
|
||||||
console = Console(highlight=False)
|
console = Console(highlight=False)
|
||||||
VERSION = "1.3"
|
VERSION = "1.3.1"
|
||||||
thread.console = console
|
thread.console = console
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class StressThread (threading.Thread):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
print("Request {}: GET on {}".format(self.n, self.path))
|
console.print("Request {}: GET on {}".format(self.n, self.path))
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if self.allow_ssl:
|
if self.allow_ssl:
|
||||||
if self.self_signed:
|
if self.self_signed:
|
||||||
@@ -45,7 +45,7 @@ class StressThread (threading.Thread):
|
|||||||
self.success = True
|
self.success = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print("Request {}: [bold red]{}[/]".format(self.n, e))
|
console.print("Request {}: [bold red]{}[/]".format(self.n, e))
|
||||||
print()
|
console.print()
|
||||||
|
|
||||||
def is_succeeded(self):
|
def is_succeeded(self):
|
||||||
return self.success
|
return self.success
|
||||||
|
|||||||
Reference in New Issue
Block a user