From 192fa446141a4ff71420e9502924d7fd551aa58c Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Sun, 15 Oct 2017 11:20:24 -0600 Subject: [PATCH] treeplot: a hack to count signed/unsigned pulls/commits --- treeplot | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/treeplot b/treeplot index 07c62fc..764c42b 100755 --- a/treeplot +++ b/treeplot @@ -245,6 +245,20 @@ def dumpflow(tree, indent = '', seen = []): print '%s%4d %s' % (indent, srcs[src], src) dumpflow(src, indent = indent + ' ', seen = seen + [tree]) +def SigStats(tree): + srcs = Treecounts[tree] + spulls = upulls = scommits = ucommits = 0 + for src in srcs.keys(): + if src in SignedTrees: + spulls += 1 + scommits += srcs[src] + else: + upulls += 1 + ucommits += srcs[src] + print '%d repos total, %d signed, %d unsigned' % (spulls + upulls, + spulls, upulls) + print ' %d commits from signed, %d from unsigned' % (scommits, ucommits) + # # Graphviz. # @@ -373,3 +387,5 @@ print 'Tree flow' dumpflow('mainline') if args.gvoutput: GV_out(args.gvoutput) +if DoSigned: + SigStats('mainline') -- 2.11.4.GIT