facebookresearch / moolib
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 571 units with 7,057 lines of code in units (63.2% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (910 lines of code)
    • 26 medium complex units (1,571 lines of code)
    • 42 simple units (1,396 lines of code)
    • 496 very simple units (3,180 lines of code)
0% | 12% | 22% | 19% | 45%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cc0% | 13% | 23% | 24% | 38%
h0% | 12% | 20% | 8% | 58%
py0% | 0% | 0% | 50% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 12% | 22% | 19% | 45%
ROOT0% | 0% | 0% | 65% | 34%
py/moolib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int find()
in src/batchsizefinder.h
180 44 7
cc
void update()
in src/accumulator.cc
141 34 0
cc
void onGreeting()
in src/rpc.cc
132 32 4
cc
void onRequest()
in src/rpc.cc
159 32 8
cc
void reduceImpl()
in src/accumulator.cc
95 29 1
void update()
in src/broker.h
100 27 0
cc
void onResponse()
in src/rpc.cc
103 26 8
bool update()
in src/group.h
89 24 3
cc
void visit()
in src/moolib.cc
72 21 2
84 20 0
73 18 1
cc
void read()
in src/rpc.cc
76 17 1
bool reduce()
in src/group.h
59 17 4
cc
bool banditSend()
in src/rpc.cc
70 16 6
void step()
in src/env.h
74 15 3
cc
py::object await()
in src/moolib.cc
72 15 0
cc
py::object deepCopy()
in src/accumulator.cc
44 15 1
void serialize()
in src/pythonserialization.h
35 15 2
void serialize()
in src/pythonserialization.h
47 14 2
42 14 2