facebookresearch / fairring
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 77 units with 1,239 lines of code in units (49.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (168 lines of code)
    • 7 simple units (281 lines of code)
    • 69 very simple units (790 lines of code)
0% | 0% | 13% | 22% | 63%
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% | 0% | 19% | 27% | 53%
h0% | 0% | 0% | 20% | 79%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fairring0% | 0% | 16% | 27% | 56%
benchmark0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
168 21 2
25 10 1
cc
void doDiffuse()
in fairring/device.cc
41 9 5
19 8 1
51 7 3
52 7 2
61 7 3
32 6 2
cc
void doReduceScatter()
in fairring/device.cc
37 5 4
cc
void doCollect()
in fairring/device.cc
35 5 5
cc
void doAllGather()
in fairring/device.cc
35 5 4
45 5 3
37 4 5
27 4 4
cc
void runOneEpoch()
in benchmark/benchmark.cc
14 3 0
cc
void checkTensors()
in benchmark/benchmark.cc
15 3 0
23 3 4
17 3 2
16 3 1
15 3 1