File Complexity Overall
  • There are 20 files with units, with 1,787 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)
    • 2 medium complex files (McCabe index sum 51-125; 548 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 433 lines of code)
    • 15 simple files (McCabe index sum 1-25; 806 lines of code)
  • 6 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 30% | 24% | 45%
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
py0% | 0% | 33% | 26% | 40%
c0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
gym30% | 0% | 30% | 24% | 45%
Most Complex Files (Top 20)

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
interop.py
in gym3
264 30 66 25 10
libenv.py
in gym3
284 17 51 18 11
199 9 38 19 16
subproc.py
in gym3
144 12 33 23 8
types.py
in gym3
90 24 33 37 8
renderer.py
in gym3/internal
177 10 24 14 6
viewer.py
in gym3
99 5 22 22 10
128 7 14 11 6
concat.py
in gym3
45 6 14 31 4
82 5 14 17 7
75 4 11 15 8
35 7 11 31 3
wrapper.py
in gym3
20 6 9 45 3
23 5 8 35 4
41 7 8 20 2
random_agent.py
in gym3/scripts
42 1 8 19 8
env.py
in gym3
17 5 6 35 2
misc.py
in gym3/internal
8 2 4 50 2
8 2 2 25 1
util.py
in gym3
6 1 1 17 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...