Thanks guys.
Here’s another one-liner that calculates “effective LOC” of flow services in an IS instance. To run it, go to the /packages directory, and use ‘find’ with a wildcard pattern to identify the non-WM packages of interest.
This example counts LOCs of flows in all packages beginning with ‘DD…’:
find DD* -name "flow.xml" | xargs -n1 grep "<MAP MODE=\"STANDALONE\"\|<INVOKE \|<BRANCH \|<LOOP \|<EXIT \|<REPEAT \|<SEQUENCE \|<MAPINVOKE \|<MAPCOPY " | grep -v "DISABLED=\"true\"" | wc -l
Note, contrasted with my earlier post, this code counts each transformer (MAPINVOKE) and explicit connector (MAPCOPY) towards the LOC. This is because each transformer is effectively a subroutine invoke, and each explicit connector is an assignment statement.
Precisely counting Java LOC requires a more involved script - it’s easier to count the java.frag files and assume an average LOC per file.
Counting DSPs and HTML templates should be easy - just modify the statement above to search for suitable files and linecount the contents.
#webMethods#webMethods-Upgrade#webMethods-General#Integration-Server-and-ESB