From c10264d1d27f36de9a2536d8db50574f07919bd5 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 3 Mar 2021 11:07:10 -0500 Subject: [PATCH] Report total calls made --- home/bin/erlcode-find-calls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/bin/erlcode-find-calls b/home/bin/erlcode-find-calls index 46f5d35..0fb49c9 100755 --- a/home/bin/erlcode-find-calls +++ b/home/bin/erlcode-find-calls @@ -41,13 +41,13 @@ find $dirs -type f -name '*.erl' -exec grep -Hn "\<$target_module\>:" '{}' \; \ for (cf in Calls_from) { split(cf, call, SUBSEP); if (call[1] == caller_module_file) - printf "%s%s\n", indent indent, call[2] | "sort"; + printf "%s%s %d\n", indent indent, call[2], Calls_from[cf] | "sort"; } close("sort") } print "all" for (called_function in Calls) - printf "%s%s\n", indent, called_function | "sort" + printf "%s%s %d\n", indent, called_function, Calls[called_function] | "sort" close("sort") }' -- 2.20.1