[ARVADOS] updated: f04ff34e47cc5ff1e625e9a5c1b1b0cbeb810d8c
Git user
git at public.curoverse.com
Wed Aug 16 10:44:02 EDT 2017
Summary of changes:
tools/crunchstat-summary/crunchstat_summary/summarizer.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
via f04ff34e47cc5ff1e625e9a5c1b1b0cbeb810d8c (commit)
from 6dd863d5fb9f9302fabec33e9e7080b1d9921cee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f04ff34e47cc5ff1e625e9a5c1b1b0cbeb810d8c
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Aug 16 10:40:51 2017 -0400
11309: Sort containers by request time.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>
diff --git a/tools/crunchstat-summary/crunchstat_summary/summarizer.py b/tools/crunchstat-summary/crunchstat_summary/summarizer.py
index 31ca42c..68fe2b4 100644
--- a/tools/crunchstat-summary/crunchstat_summary/summarizer.py
+++ b/tools/crunchstat-summary/crunchstat_summary/summarizer.py
@@ -565,10 +565,14 @@ class ContainerTreeSummarizer(MultiSummarizer):
while len(todo) > 0:
current = todo.popleft()
label = current['name']
+ sort_key = current['created_at']
if current['uuid'].find('-xvhdp-') > 0:
current = arv.containers().get(uuid=current['container_uuid']).execute()
- children[current['uuid']] = ContainerSummarizer(
- current, label=label, **kwargs)
+
+ summer = ContainerSummarizer(current, label=label, **kwargs)
+ summer.sort_key = sort_key
+ children[current['uuid']] = summer
+
page_filters = []
while True:
items = arv.container_requests().index(
@@ -584,7 +588,10 @@ class ContainerTreeSummarizer(MultiSummarizer):
logger.debug('%s: container req %s', current['uuid'], cr['uuid'])
cr['name'] = cr.get('name') or cr['uuid']
todo.append(cr)
+ sorted_children = collections.OrderedDict()
+ for uuid in sorted(children.keys(), key=lambda uuid: children[uuid].sort_key):
+ sorted_children[uuid] = children[uuid]
super(ContainerTreeSummarizer, self).__init__(
- children=children,
+ children=sorted_children,
label=root['name'],
**kwargs)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list