File Complexity Overall
  • There are 45 files with units, with 4,091 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 3 medium complex files (McCabe index sum 51-125; 933 lines of code)
    • 4 slightly complex files (McCabe index sum 26-50; 720 lines of code)
    • 38 simple files (McCabe index sum 1-25; 2,438 lines of code)
  • 13 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 22% | 17% | 59%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
cc0% | 0% | 21% | 14% | 63%
py0% | 0% | 100% | 0% | 0%
h0% | 0% | 0% | 30% | 69%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
scripts0% | 0% | 100% | 0% | 0%
utils0% | 0% | 16% | 34% | 49%
dumper0% | 0% | 39% | 0% | 60%
tasks0% | 0% | 0% | 0% | 100%
common0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 45)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
nc_dump_ebs.py
in scripts/bastion_scripts/ebs
377 14 66 18 11
335 12 65 19 14
221 27 62 28 26
file_util.cc
in utils
227 17 48 21 11
249 30 33 13 2
147 19 31 21 5
status.h
in utils
97 24 26 27 2
147 4 25 17 12
dumper.cc
in dumper
210 7 25 12 14
socket.cc
in utils
120 7 24 20 9
stopwatch.h
in utils
133 14 23 17 6
123 22 22 18 1
163 4 21 13 12
133 4 19 14 11
metrics.h
in utils
60 18 18 30 1
slice.h
in utils
57 7 12 21 5
56 4 11 20 5
aws_utils.cc
in utils
85 9 11 13 2
105 6 10 10 3
status.cc
in utils
71 1 10 14 10
89 2 9 10 7
46 9 9 20 1
24 2 7 29 5
51 4 5 10 2
47 3 5 11 2
41 2 4 10 3
task.cc
in tasks
59 3 4 7 2
mem_mgr.cc
in utils
35 2 4 11 3
aws_utils.h
in utils
32 4 4 13 1
net_util.cc
in utils
29 1 4 14 4
18 2 4 22 2
42 2 3 7 2
50 3 3 6 1
32 3 3 9 1
17 1 2 12 2
file_util.h
in utils
63 2 2 3 1
sockaddr.cc
in utils
29 1 2 7 2
44 1 2 5 2
metrics.cc
in utils
56 2 2 4 1
44 1 1 2 1
task.h
in tasks
47 1 1 2 1
23 1 1 4 1
mem_mgr.h
in utils
21 1 1 5 1
logger.cc
in common
16 1 1 6 1
logger.h
in common
20 1 1 5 1
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...