facebookexperimental / starlark-rust
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 1,724 units with 16,621 lines of code in units (41.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (603 lines of code)
    • 46 simple units (1,585 lines of code)
    • 1,670 very simple units (14,433 lines of code)
0% | 0% | 3% | 9% | 86%
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
rs0% | 0% | 3% | 9% | 86%
py0% | 0% | 0% | 15% | 84%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
starlark/src/syntax0% | 0% | 20% | 20% | 58%
starlark/src/eval0% | 0% | 3% | 6% | 90%
starlark/src/values0% | 0% | 1% | 6% | 91%
starlark/src/stdlib0% | 0% | 4% | 15% | 79%
starlark_derive/src0% | 0% | 6% | 12% | 81%
starlark/src/analysis0% | 0% | 3% | 26% | 69%
benchmark0% | 0% | 0% | 15% | 84%
starlark/src/collections0% | 0% | 0% | 0% | 100%
starlark/src/assert0% | 0% | 0% | 0% | 100%
starlark/src/errors0% | 0% | 0% | 0% | 100%
starlark/src/debug0% | 0% | 0% | 0% | 100%
starlark/src0% | 0% | 0% | 0% | 100%
starlark/src/environment0% | 0% | 0% | 0% | 100%
starlark/src/macros0% | 0% | 0% | 0% | 100%
vscode/client/src0% | 0% | 0% | 0% | 100%
starlark0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
162 22 4
88 16 4
83 14 2
60 13 3
67 12 2
39 11 4
27 11 3
77 11 1
28 10 4
34 10 2
24 10 1
32 10 3
46 10 2
38 9 1
32 9 0
22 9 1
28 9 1
36 9 6
47 8 1
37 8 2
79 8 2
19 7 1
25 7 1
29 7 1
16 7 1
41 7 4
61 7 2
32 7 4
20 7 2
33 7 2
55 7 1
28 7 2
25 7 2
26 7 2
27 7 2
15 7 1
93 7 3
37 6 3
51 6 2
19 6 2
47 6 0
33 6 5
44 6 0
20 6 1
11 6 1
11 6 1
36 6 2
36 6 2
31 6 2
79 6 5