Today, I did an interesting exercice I haven’t done for years : code metrics.
I used the very nice software SourceMonitor.
My goal was to obtain some key figures regarding our software solution:
- number of lines
- % of comments and documentation
- % of automatically generated code
I only selected the source code dedicated for calculation/simulation purposes (no data files, no unit tests, no GUI code, no python scripts, no code used for automatic generation, no third party libraries).
I came to the following results:
I must say that python wrappers are very significant in those impressive results (350k lines of automatically generated code).
numenGo|MPS and numenGo|FFC are almost completely handwritten, and are quite some piece of code:
Regarding numenGo|FL, as we use Model Driven Architecture, most of it is automatically generated. If we consider only source code (meaning we exclude model description files such a .spe files for AMESim, and .mdl files for Simulink. Note that modelica files for simulationX is both code and model description), we have the following distribution:
See, that’s already a good piece of software, especially when you consider it is object-oriented programming (few redundancies, inheritance…). Imagine what it is capable of ! Give it a try !