File Complexity Overall
  • There are 164 files with units, with 52,912 lines of code.
    • 7 very complex files (McCabe index sum 251+; 8,560 lines of code)
    • 11 complex files (McCabe index sum 126-250; 16,415 lines of code)
    • 26 medium complex files (McCabe index sum 51-125; 12,175 lines of code)
    • 36 slightly complex files (McCabe index sum 26-50; 8,858 lines of code)
    • 84 simple files (McCabe index sum 1-25; 6,904 lines of code)
  • 302 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system16% | 31% | 23% | 16% | 13%
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
py40% | 6% | 19% | 18% | 14%
cpp100% | 0% | 0% | 0% | 0%
c2% | 42% | 26% | 15% | 12%
h0% | 0% | 0% | 61% | 38%
pyx0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
python40% | 6% | 19% | 18% | 15%
libvmaf9% | 40% | 23% | 15% | 11%
matlab0% | 0% | 40% | 30% | 29%
Most Complex Files (Top 50)

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
svm.cpp
in libvmaf/src
2677 82 494 18 43
train_test_model.py
in python/vmaf/core
1416 105 356 25 27
routine.py
in python/vmaf
962 19 314 33 171
libvmaf.c
in libvmaf/src
1075 40 292 27 34
asset.py
in python/vmaf/core
716 81 271 38 17
executor.py
in python/vmaf/core
675 60 267 40 21
quality_runner.py
in python/vmaf/core
1039 95 264 25 62
integer_adm.c
in libvmaf/src/feature
2656 22 241 9 36
cambi.c
in libvmaf/src/feature
1177 44 238 20 42
speed.c
in libvmaf/src/feature
1356 54 228 17 20
adm_tools.c
in libvmaf/src/feature
1074 13 211 20 113
adm_avx2.c
in libvmaf/src/feature/x86
3358 16 207 6 37
adm_avx512.c
in libvmaf/src/feature/x86
3358 14 203 6 37
read_json_model.c
in libvmaf/src
611 20 180 29 44
feature_extractor.py
in python/vmaf/core
756 29 176 23 47
pdjson.c
in libvmaf/src
823 32 134 16 30
cli_parse.c
in libvmaf/tools
682 26 127 19 45
vif_tools.c
in libvmaf/src/feature
564 31 126 22 10
y4m_input.c
in libvmaf/tools
618 13 116 19 24
scanf.py
in python/vmaf/tools
460 63 115 25 6
misc.py
in python/vmaf/tools
345 45 113 33 14
edges.c
in matlab/strred/matlabPyrTools/MEX
466 11 113 24 28
adm_neon.c
in libvmaf/src/feature/arm64
763 23 106 14 18
integer_adm_cuda.c
in libvmaf/src/feature/cuda
971 27 101 10 17
result.py
in python/vmaf/core
335 32 100 30 16
picture.c
in libvmaf/src
480 24 100 21 18
predict.c
in libvmaf/src
433 13 100 23 22
output.c
in libvmaf/src
323 6 98 30 45
vmaf.c
in libvmaf/tools
403 4 96 24 80
feature_collector.c
in libvmaf/src/feature
364 16 92 25 14
feature_extractor.c
in libvmaf/src/feature
411 12 90 22 13
nn_train_test_model.py
in python/vmaf/core
401 24 84 21 10
float_motion.c
in libvmaf/src/feature
409 4 84 21 43
cambi_avx2.c
in libvmaf/src/feature/x86
358 12 76 21 20
edges-orig.c
in matlab/strred/matlabPyrTools/MEX
318 10 73 23 15
__init__.py
in python/vmaf
219 10 70 32 27
integer_vif.c
in libvmaf/src/feature
700 12 67 10 11
getopt.c
in libvmaf/src/compat/getopt
260 9 61 23 25
perf_metric.py
in python/vmaf/core
307 19 57 19 15
cross_validation.py
in python/vmaf/core
245 9 57 23 16
vif_avx2.c
in libvmaf/src/feature/x86
1283 4 57 4 19
ciede.c
in libvmaf/src/feature
304 18 57 19 8
vif_neon.c
in libvmaf/src/feature/arm64
810 4 54 7 16
convolve.c
in libvmaf/src/feature/iqa
189 7 52 28 16
matlab_feature_extractor.py
in python/vmaf/core
302 16 50 17 8
common.c
in libvmaf/src/cuda
187 13 50 27 7
reader.py
in python/vmaf/tools
152 18 48 32 23
dict.c
in libvmaf/src
177 9 47 27 21
barten_csf_tools.h
in libvmaf/src/feature
185 6 46 25 19
convolution_avx.c
in libvmaf/src/feature/common
174 7 46 26 10
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...