From eb5c7b9d83c3e607ac2cde6e025a19387859fdd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 31 Mar 2021 18:58:02 +0200 Subject: [PATCH] 2.15.2 --- CHANGELOG.md | 1 + satella/__init__.py | 2 +- satella/instrumentation/cpu_time/collector.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aebe3d0..059a590e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,3 +2,4 @@ * changed schema's file to return a file-object * more `ThreadCollection` methods return self, permitting writing more conciser code +* fix a bug in `ThreadCollection` diff --git a/satella/__init__.py b/satella/__init__.py index 919cebbc..30334bd3 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.15.2a3' +__version__ = '2.15.2' diff --git a/satella/instrumentation/cpu_time/collector.py b/satella/instrumentation/cpu_time/collector.py index beefea3f..e3413307 100644 --- a/satella/instrumentation/cpu_time/collector.py +++ b/satella/instrumentation/cpu_time/collector.py @@ -56,7 +56,7 @@ class CPUProfileBuilderThread(threading.Thread): def recalculate(self) -> None: data = [] calculate_occupancy_factor() # as first values tend to be a bit wonky - for _ in range(self.window_size): + for _ in range(int(self.window_size)): time.sleep(1) data.append(calculate_occupancy_factor()) percentiles = [] -- GitLab