From fb54e557bb7bc1d80261ebd03642272bf6e671fd Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Wed, 25 Oct 2023 14:13:28 -0400 Subject: [PATCH] fixed concurrency value --- src/radical/analytics/session.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/radical/analytics/session.py b/src/radical/analytics/session.py index 50e6a10..d9e9da0 100644 --- a/src/radical/analytics/session.py +++ b/src/radical/analytics/session.py @@ -857,16 +857,19 @@ def concurrency(self, state=None, event=None, time=None, sampling=None): else: # select data points according to sampling # get min time, and create timestamps at regular intervals - t = times[0][0] - ret = list() + t = times[0][0] + v = collapsed[0][1] + ret = list() for time, val in collapsed: while time >= t: - ret.append([t, val]) + ret.append([t, v]) t += sampling + # value is changed after reaching the next timestamp + v = val # append last time stamp if it is not appended, yet - if ret[-1] != [t, val]: - ret.append([t, val]) + if ret[-1] != [t, v]: + ret.append([t, v]) return ret