File Complexity Overall
  • There are 19 files with units, with 2,694 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; 622 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 979 lines of code)
    • 14 simple files (McCabe index sum 1-25; 1,093 lines of code)
  • 1 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 23% | 36% | 40%
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% | 23% | 36% | 40%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
improved_diffusion0% | 0% | 28% | 44% | 27%
scripts0% | 0% | 0% | 0% | 100%
datasets0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 19)

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
logger.py
in improved_diffusion
327 49 103 31 8
train_util.py
in improved_diffusion
295 21 68 23 10
gaussian_diffusion.py
in improved_diffusion
540 25 47 9 12
unet.py
in improved_diffusion
356 23 38 11 4
nn.py
in improved_diffusion
83 14 28 34 4
resample.py
in improved_diffusion
78 11 24 31 9
respace.py
in improved_diffusion
79 8 22 28 11
script_util.py
in improved_diffusion
263 10 19 7 4
fp16_util.py
in improved_diffusion
34 7 16 47 3
95 3 15 16 7
image_datasets.py
in improved_diffusion
73 5 14 19 5
image_sample.py
in scripts
87 2 14 16 13
dist_util.py
in improved_diffusion
48 5 11 23 4
losses.py
in improved_diffusion
40 3 8 20 6
image_nll.py
in scripts
73 3 8 11 6
lsun_bedroom.py
in datasets
40 3 6 15 3
cifar10.py
in datasets
35 1 4 11 4
80 3 4 5 2
image_train.py
in scripts
68 2 2 3 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...