File Complexity Overall
  • There are 25 files with units, with 7,307 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 1,083 lines of code)
    • 2 medium complex files (McCabe index sum 51-125; 1,731 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 855 lines of code)
    • 19 simple files (McCabe index sum 1-25; 3,638 lines of code)
  • 7 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 14% | 23% | 11% | 49%
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% | 14% | 23% | 11% | 49%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
opf0% | 14% | 23% | 11% | 49%
Most Complex Files (Top 25)

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
runner.py
in opf/_eval
1083 23 139 13 86
runner.py
in opf/_train
814 17 64 8 38
model.py
in opf/_model
917 26 61 7 18
_api.py
in opf
258 28 40 16 3
decoding.py
in opf/_core
415 14 36 9 10
182 7 34 19 13
args.py
in opf/_cli
102 6 22 22 13
metrics.py
in opf/_eval
708 10 22 3 9
weights.py
in opf/_model
169 8 20 12 7
runtime.py
in opf/_core
338 9 19 6 6
106 7 19 18 5
data.py
in opf/_eval
95 3 16 17 11
render.py
in opf/_eval
247 10 15 6 3
135 4 14 10 8
label_space.py
in opf/_common
332 8 11 3 4
common.py
in opf/_cli
100 9 10 10 2
render.py
in opf/_cli
121 6 8 7 3
preprocess.py
in opf/_eval
242 6 8 3 3
spans.py
in opf/_core
227 7 7 3 1
18 2 6 33 5
terminal_colors.py
in opf/_common
36 2 5 14 4
triton_moe.py
in opf/_model
286 4 4 1 1
args.py
in opf/_train
162 2 3 2 2
args.py
in opf/_eval
206 2 3 1 2
env.py
in opf/_common
8 1 2 25 2
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...