From a8b1c505b467742b2cf04fa5b89979f65c89b939 Mon Sep 17 00:00:00 2001 From: Andrey Nehaychik Date: Wed, 19 Jan 2022 22:28:33 +0300 Subject: [PATCH 1/3] Fix TimeChopper init --- yandextank/plugins/JMeter/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yandextank/plugins/JMeter/reader.py b/yandextank/plugins/JMeter/reader.py index a72c97d16..fdc918a47 100644 --- a/yandextank/plugins/JMeter/reader.py +++ b/yandextank/plugins/JMeter/reader.py @@ -164,7 +164,7 @@ def __init__(self, filename): self.closed = False self.stat_queue = q.Queue() self.stats_reader = JMeterStatAggregator( - TimeChopper(self._read_stat_queue(), 3)) + TimeChopper(self._read_stat_queue())) def _read_stat_queue(self): while not self.closed: From 688d69f07984d0ac91c93b1393db9a5de9b5bd40 Mon Sep 17 00:00:00 2001 From: Andrey Nehaychik Date: Wed, 19 Jan 2022 22:46:32 +0300 Subject: [PATCH 2/3] Adapt for python3 --- yandextank/aggregator/chopper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yandextank/aggregator/chopper.py b/yandextank/aggregator/chopper.py index d36dfd57c..85b2a42f3 100644 --- a/yandextank/aggregator/chopper.py +++ b/yandextank/aggregator/chopper.py @@ -17,7 +17,7 @@ def __init__(self, sources): # self.cache_size = cache_size self.sources = sources self.cache = {} - self.recent_ts = [0] * len(self.sources) + self.recent_ts = [0] * len([i for i in self.sources]) def __iter__(self): try: From 07bfdb1bacf3e17e97a92df5610086b5e8fd5dfe Mon Sep 17 00:00:00 2001 From: Andrey Nehaychik Date: Thu, 20 Jan 2022 14:27:22 +0300 Subject: [PATCH 3/3] Fix init --- yandextank/aggregator/chopper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yandextank/aggregator/chopper.py b/yandextank/aggregator/chopper.py index 85b2a42f3..67524b3c7 100644 --- a/yandextank/aggregator/chopper.py +++ b/yandextank/aggregator/chopper.py @@ -17,7 +17,7 @@ def __init__(self, sources): # self.cache_size = cache_size self.sources = sources self.cache = {} - self.recent_ts = [0] * len([i for i in self.sources]) + self.recent_ts = [] def __iter__(self): try: