From 0ca05d60d210531943e5401a6775b7e23b88e459 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 20 Jan 2015 00:01:40 +0100 Subject: [PATCH] Added Instability factor in man --- src/create_man.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/create_man.py b/src/create_man.py index cc8df59..9bb8bdf 100644 --- a/src/create_man.py +++ b/src/create_man.py @@ -93,6 +93,11 @@ def do_print(var): var.needed_by.sort() print >>file, ".SH Needed by" process_deps(file,var.needed_by) + print >>file, ".SH Instability factor" + fo = len(var.children) + fi = len(var.parents) + print >>file, 100.* (fi / (fi+fo+.000001) ), "%" + print >>file, ".br" file.close() ###################################################################### @@ -133,6 +138,11 @@ def do_print_subroutines(sub): sub.touches.sort() print >>file, ".SH Touches" process_deps(file,sub.touches) + print >>file, ".SH Instability factor" + fo = len(sub.needs)+len(sub.calls)+len(sub.touches) + fi = len(sub.called_by) + print >>file, 100.* (fi / (fi+fo+.000001) ), "%" + print >>file, ".br" file.close() ######################################################################