From d26de98332f5afcb9396b5d9214d986faf51f0fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 8 Mar 2015 00:00:37 +0100 Subject: [PATCH] Proper startig time in each interval. --- chroust.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chroust.py b/chroust.py index bf3ef1a..6f5d5ae 100755 --- a/chroust.py +++ b/chroust.py @@ -118,9 +118,9 @@ for nodeid in sorted(nodes.keys()): print "\t".join(usages) i = min -while i <= max: - start = i - interval * 500 - end = i + interval * 500 +while i < max: + start = i + end = i + 1000 * interval st.execute('SELECT * FROM subjobs WHERE finish >= %s AND start <= %s', (start, end)) #print '%s: %d subjobs' % (strp(i), st.rowcount) subjobs = st.rowcount -- 1.8.2.3