File Complexity Overall
  • There are 107 files with units, with 10,787 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 695 lines of code)
    • 10 medium complex files (McCabe index sum 51-125; 2,795 lines of code)
    • 15 slightly complex files (McCabe index sum 26-50; 2,373 lines of code)
    • 81 simple files (McCabe index sum 1-25; 4,924 lines of code)
  • 17 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 6% | 25% | 21% | 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% | 6% | 25% | 21% | 45%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
baselines0% | 6% | 25% | 21% | 45%
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
kfac.py
in baselines/acktr
695 15 199 29 44
logger.py
in baselines
362 52 110 30 9
distributions.py
in baselines/common
284 83 97 34 5
tf_util.py
in baselines/common
271 35 95 35 8
ddpg.py
in baselines/her
307 25 85 28 13
ddpg_learner.py
in baselines/ddpg
312 21 68 22 8
trpo_mpi.py
in baselines/trpo_mpi
314 8 67 21 44
trpo_mpi.py
in baselines/gail
290 4 66 23 51
utils.py
in baselines/a2c
239 32 66 28 6
atari_wrappers.py
in baselines/common
202 31 61 30 6
retro_wrappers.py
in baselines/common
214 31 60 28 9
plot_util.py
in baselines/common
358 10 49 14 24
run.py
in baselines
185 10 46 25 13
subproc_vec_env.py
in baselines/common/vec_env
109 11 46 42 14
deepq.py
in baselines/deepq
198 8 46 23 35
cmd_util.py
in baselines/common
154 10 42 27 17
vec_env.py
in baselines/common/vec_env
121 28 40 33 4
monitor.py
in baselines/bench
142 14 38 27 9
ddpg.py
in baselines/ddpg
216 1 34 16 34
shmem_vec_env.py
in baselines/common/vec_env
111 8 34 31 9
ppo2.py
in baselines/ppo2
152 3 32 21 29
mpi_util.py
in baselines/common
91 7 31 34 8
pposgd_simple.py
in baselines/ppo1
174 4 30 17 15
misc_util.py
in baselines/common
100 13 29 29 7
rollout.py
in baselines/her
105 8 28 27 15
build_graph.py
in baselines/deepq
157 7 28 18 8
run_mujoco.py
in baselines/gail
193 6 25 13 6
policies.py
in baselines/common
98 8 25 26 10
models.py
in baselines/common
156 14 22 14 3
console_util.py
in baselines/common
64 8 22 34 6
segment_tree.py
in baselines/common
69 10 22 32 5
dummy_vec_env.py
in baselines/common/vec_env
57 8 22 39 4
mujoco_dset.py
in baselines/gail/dataset
94 8 21 22 6
acer.py
in baselines/acer
257 6 21 8 9
dataset.py
in baselines/common
48 6 21 44 8
util.py
in baselines/her
92 9 21 23 5
replay_buffer.py
in baselines/her
66 9 20 30 6
config.py
in baselines/her/experiment
153 7 20 13 7
her.py
in baselines/her
150 4 19 13 14
mpi_adam_optimizer.py
in baselines/common
69 4 18 26 10
acktr.py
in baselines/acktr
126 2 18 14 15
benchmarks.py
in baselines/bench
122 5 17 14 7
replay_buffer.py
in baselines/deepq
77 10 17 22 2
kfac_utils.py
in baselines/acktr
69 4 17 25 11
a2c.py
in baselines/a2c
134 2 17 13 10
buffer.py
in baselines/acer
105 10 16 15 3
memory.py
in baselines/ddpg
62 10 16 26 3
mpi_adam.py
in baselines/common
85 5 16 19 4
running_mean_std.py
in baselines/common
133 10 16 12 5
results_plotter.py
in baselines
76 7 15 20 6
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...