File Complexity Overall
  • There are 46 files with units, with 3,831 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; 405 lines of code)
    • 14 slightly complex files (McCabe index sum 26-50; 1,792 lines of code)
    • 30 simple files (McCabe index sum 1-25; 1,634 lines of code)
  • 12 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 10% | 46% | 42%
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% | 10% | 46% | 42%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
spinup0% | 0% | 10% | 46% | 42%
Most Complex Files (Top 46)

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
run_utils.py
in spinup/utils
239 14 68 28 15
logx.py
in spinup/utils
166 16 58 35 7
core.py
in spinup/algos/tf1/trpo
97 21 42 43 5
trpo.py
in spinup/algos/tf1/trpo
188 5 40 21 33
run.py
in spinup
129 3 38 29 35
plot.py
in spinup/utils
117 5 38 32 19
td3.py
in spinup/algos/pytorch/td3
169 4 31 18 27
sac.py
in spinup/algos/pytorch/sac
169 4 30 18 26
exercise1_3.py
in spinup/exercises/pytorch/problem_set_1
159 4 30 19 26
core.py
in spinup/algos/pytorch/vpg
78 18 29 37 4
core.py
in spinup/algos/pytorch/ppo
78 18 29 37 4
core.py
in spinup/algos/tf1/vpg
63 13 27 43 5
core.py
in spinup/algos/tf1/ppo
63 13 27 43 5
ppo.py
in spinup/algos/pytorch/ppo
171 5 27 16 21
vpg.py
in spinup/algos/pytorch/vpg
159 5 26 16 20
ddpg.py
in spinup/algos/pytorch/ddpg
152 4 26 17 22
sac.py
in spinup/algos/tf1/sac
156 4 23 15 20
ppo.py
in spinup/algos/tf1/ppo
153 5 23 15 18
core.py
in spinup/algos/pytorch/sac
67 9 22 33 8
vpg.py
in spinup/algos/tf1/vpg
141 5 21 15 16
ddpg.py
in spinup/algos/tf1/ddpg
142 4 20 14 17
mpi_tf.py
in spinup/utils
47 7 19 40 7
td3.py
in spinup/algos/tf1/td3
155 4 19 12 16
exercise1_3.py
in spinup/exercises/tf1/problem_set_1
152 4 19 13 16
mpi_tools.py
in spinup/utils
50 10 18 36 4
core.py
in spinup/algos/tf1/sac
50 9 16 32 3
core.py
in spinup/algos/pytorch/ddpg
43 9 15 35 3
core.py
in spinup/algos/pytorch/td3
44 9 15 34 3
serialization_utils.py
in spinup/utils
25 2 14 56 13
core.py
in spinup/algos/tf1/ddpg
26 6 12 46 3
core.py
in spinup/algos/tf1/td3
28 6 12 43 3
exercise1_2_soln.py
in spinup/exercises/pytorch/problem_set_1_solutions
36 8 11 31 3
exercise2_2.py
in spinup/exercises/pytorch/problem_set_2
60 7 9 15 2
mpi_pytorch.py
in spinup/utils
24 3 8 33 3
exercise1_2.py
in spinup/exercises/pytorch/problem_set_1
47 7 8 17 2
exercise1_2_auxiliary.py
in spinup/exercises/pytorch/problem_set_1
32 6 8 25 3
exercise1_2_soln.py
in spinup/exercises/tf1/problem_set_1_solutions
19 3 4 21 2
exercise2_2.py
in spinup/exercises/tf1/problem_set_2
43 2 3 7 2
exercise1_2.py
in spinup/exercises/tf1/problem_set_1
26 2 2 8 1
common.py
in spinup/exercises
7 1 2 29 2
version.py
in spinup
5 1 1 20 1
trpo.py
in spinup/algos/pytorch/trpo
4 1 1 25 1
exercise1_1_soln.py
in spinup/exercises/tf1/problem_set_1_solutions
6 1 1 17 1
exercise1_1.py
in spinup/exercises/tf1/problem_set_1
22 1 1 5 1
exercise1_1_soln.py
in spinup/exercises/pytorch/problem_set_1_solutions
6 1 1 17 1
exercise1_1.py
in spinup/exercises/pytorch/problem_set_1
18 1 1 6 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...