Tracking code complexity in the project?
Petter Reinholdtsen
pere at hungry.com
Wed Feb 8 08:05:54 CET 2017
Hi. I've been interested in trying to track code complexity in one of
my projects for some time now, and wonder if it would be interesting to
do this for Nikita?
I'm not sure which tools is best for this, but came across
<URL: https://sourceforge.net/projects/metrixplusplus/ > which is able
to measure the complexity of Java, C, C++ and C#. As my projects these
days normally involve python, shell, perl and ruby, I have been missing
a project to measure.:)
Perhaps we should run it regularly on the Nikita code base and keep an
eye on the trend? This is the output from 'metrix++.py view' on the
current master branch:
./:: info: Overall metrics for 'std.code.lines:code' metric
Average : 7.53810623557
Minimum : 1
Maximum : 323
Total : 19584.0
Distribution : 2598 regions in total (including 0 suppressed)
Metric value : Ratio : R-sum : Number of regions
1-2 : 0.052 : 0.052 : 134 |||||
3 : 0.475 : 0.527 : 1234 |||||||||||||||||||||||||||||||||||||||||||||||
4 : 0.212 : 0.739 : 552 |||||||||||||||||||||
5 : 0.017 : 0.756 : 44 ||
6 : 0.024 : 0.780 : 62 ||
7 : 0.019 : 0.799 : 50 ||
8-9 : 0.031 : 0.830 : 80 |||
10-11 : 0.020 : 0.849 : 51 ||
12-13 : 0.018 : 0.867 : 46 ||
14-15 : 0.022 : 0.889 : 57 ||
16-17 : 0.017 : 0.906 : 45 ||
18-19 : 0.016 : 0.922 : 41 ||
20-21 : 0.010 : 0.933 : 27 |
22-23 : 0.010 : 0.943 : 27 |
24-26 : 0.012 : 0.955 : 31 |
27-30 : 0.009 : 0.964 : 24 |
31-35 : 0.009 : 0.973 : 23 |
36-52 : 0.009 : 0.982 : 24 |
53-71 : 0.010 : 0.992 : 25 |
72-323 : 0.008 : 1.000 : 21 |
./:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
Average : 0.569835111542
Minimum : 0
Maximum : 49
Total : 1175.0
Distribution : 2062 regions in total (including 0 suppressed)
Metric value : Ratio : R-sum : Number of regions
0 : 0.741 : 0.741 : 1527 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 : 0.197 : 0.937 : 406 ||||||||||||||||||||
2 : 0.009 : 0.946 : 18 |
3 : 0.015 : 0.961 : 30 |
4 : 0.016 : 0.976 : 32 ||
5 : 0.007 : 0.983 : 14 |
6 : 0.002 : 0.985 : 5
7 : 0.003 : 0.988 : 6
8 : 0.001 : 0.989 : 2
9 : 0.001 : 0.991 : 3
10 : 0.001 : 0.992 : 2
11-12 : 0.001 : 0.993 : 2
13 : 0.001 : 0.994 : 2
14 : 0.001 : 0.995 : 3
15 : 0.001 : 0.996 : 2
16-17 : 0.001 : 0.997 : 2
19-20 : 0.001 : 0.998 : 2
21 : 0.000 : 0.999 : 1
22-25 : 0.001 : 1.000 : 2
49 : 0.000 : 1.000 : 1
./:: info: Directory content:
Directory : client-test-webapp-rest
Directory : core-webapp
Directory : core-common
--
Happy hacking
Petter Reinholdtsen
More information about the nikita-noark
mailing list