facebookincubator / flowtorch
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 170 units with 1,145 lines of code in units (29.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (148 lines of code)
    • 8 simple units (169 lines of code)
    • 159 very simple units (828 lines of code)
0% | 0% | 12% | 14% | 72%
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
py0% | 0% | 15% | 17% | 67%
js0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scripts0% | 0% | 35% | 46% | 17%
flowtorch0% | 0% | 31% | 22% | 45%
flowtorch/bijectors0% | 0% | 0% | 3% | 96%
website/src/theme0% | 0% | 0% | 0% | 100%
flowtorch/bijectors/ops0% | 0% | 0% | 0% | 100%
flowtorch/parameters0% | 0% | 0% | 0% | 100%
flowtorch/distributions0% | 0% | 0% | 0% | 100%
flowtorch/ops0% | 0% | 0% | 0% | 100%
flowtorch/nn0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
60 21 2
39 20 1
49 12 3
13 10 2
25 10 1
30 10 1
27 9 2
36 7 1
11 7 2
16 6 3
11 6 1
9 5 2
14 5 2
6 5 1
12 5 3
14 5 1
6 4 1
2 4 2
4 4 0
6 4 2
14 4 1
4 3 1
5 3 1
5 3 1
8 3 1
2 3 2
5 3 1
8 3 1
4 3 1
37 3 1
6 3 1
20 3 2
8 2 1
5 2 1
7 2 2
11 2 1
2 2 2
3 2 0
5 2 0
6 2 2
13 2 3
20 2 1
9 1 0
7 1 0
2 1 0
2 1 0
7 1 0
5 1 0
2 1 0
2 1 0