From 80425c9ccd6bbd5b398d74fc0cd3874a722132f8 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 20 Nov 2008 11:13:04 +0000 Subject: [PATCH] Minor adjustment to ETA feature --- lib/core/progress.py | 6 +++--- lib/request/inject.py | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/progress.py b/lib/core/progress.py index fd6c838eb..2ab733292 100644 --- a/lib/core/progress.py +++ b/lib/core/progress.py @@ -35,9 +35,9 @@ class ProgressBar: def __init__(self, minValue=0, maxValue=10, totalWidth=54): self.__progBar = "[]" self.__oldProgBar = "" - self.__min = minValue - self.__max = maxValue - self.__span = maxValue - minValue + self.__min = int(minValue) + self.__max = int(maxValue) + self.__span = self.__max - self.__min self.__width = totalWidth self.__amount = 0 self.update() diff --git a/lib/request/inject.py b/lib/request/inject.py index b39847ab5..ffafeaaac 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -67,6 +67,10 @@ def __goInference(payload, expression): count, value = bisection(payload, expression, length=length) duration = int(time.time() - start) + if conf.eta and length: + infoMsg = "retrieved: %s" % value + logger.info(infoMsg) + infoMsg = "performed %d queries in %d seconds" % (count, duration) logger.info(infoMsg)