[ARVADOS] created: 1.3.0-783-g5254ba765
Git user
git at public.curoverse.com
Mon Apr 22 19:38:03 UTC 2019
at 5254ba765ef759bb59584d7304ec22b77238772c (commit)
commit 5254ba765ef759bb59584d7304ec22b77238772c
Author: Tom Morris <tfmorris at veritasgenetics.com>
Date: Mon Apr 22 15:34:39 2019 -0400
Fix iteration order dependency.
Causes tests to fail in Python 3.5, but not Python 3.7 due to dependency on iteration order of dicts.
Refs #14939
Arvados-DCO-1.1-Signed-off-by: Tom Morris <tfmorris at veritasgenetics.com>
diff --git a/tools/crunchstat-summary/crunchstat_summary/summarizer.py b/tools/crunchstat-summary/crunchstat_summary/summarizer.py
index bf905a394..6d567e68d 100644
--- a/tools/crunchstat-summary/crunchstat_summary/summarizer.py
+++ b/tools/crunchstat-summary/crunchstat_summary/summarizer.py
@@ -207,17 +207,18 @@ class Summarizer(object):
stats['user+sys'] = stats.get('user', 0) + stats.get('sys', 0)
if 'tx' in stats or 'rx' in stats:
stats['tx+rx'] = stats.get('tx', 0) + stats.get('rx', 0)
- for stat, val in stats.items():
- if group == 'interval':
- if stat == 'seconds':
- this_interval_s = val
- continue
- elif not (this_interval_s > 0):
+ if group == 'interval':
+ if 'seconds' in stats:
+ this_interval_s = stats.get('seconds',0)
+ del stats['seconds']
+ if this_interval_s <= 0:
logger.error(
"BUG? interval stat given with duration {!r}".
format(this_interval_s))
- continue
- else:
+ else:
+ logger.error('BUG? interval stat missing duration')
+ for stat, val in stats.items():
+ if group == 'interval' and this_interval_s:
stat = stat + '__rate'
val = val / this_interval_s
if stat in ['user+sys__rate', 'tx+rx__rate']:
commit cf8a475732f7a62108704b6d7803400681a69eba
Author: Tom Morris <tfmorris at veritasgenetics.com>
Date: Wed Mar 27 13:19:24 2019 -0400
Add crunchstat-summary Python 3 to all tests.
Refs #14939
Arvados-DCO-1.1-Signed-off-by: Tom Morris <tfmorris at veritasgenetics.com>
diff --git a/build/run-tests.sh b/build/run-tests.sh
index dbf13940b..7f6433dbd 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -973,6 +973,7 @@ pythonstuff=(
services/fuse
services/nodemanager
tools/crunchstat-summary
+ tools/crunchstat-summary:py3
)
declare -a gostuff
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list