anthropics / redis-py
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,644 units with 9,419 lines of code in units (44.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (146 lines of code)
    • 21 medium complex units (851 lines of code)
    • 68 simple units (1,124 lines of code)
    • 1,553 very simple units (7,298 lines of code)
0% | 1% | 9% | 11% | 77%
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% | 1% | 9% | 11% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
redis0% | 1% | 9% | 11% | 77%
benchmarks0% | 0% | 0% | 40% | 59%
doctests0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
80 37 2
66 27 3
74 24 4
48 22 4
49 21 1
36 21 2
44 20 1
59 20 3
38 20 1
56 19 2
29 18 2
40 18 1
39 17 3
31 16 2
96 16 1
47 14 3
26 13 2
20 13 2
29 13 3
30 13 2
25 11 2
23 11 3
12 11 1
34 10 2
25 10 2
23 10 4
9 10 1
12 10 2
35 10 2
25 10 2
25 9 2
23 9 1
17 9 3
24 9 3
29 9 3
43 9 3
11 9 5
27 9 2
30 8 1
21 8 2
17 8 2
12 8 1
14 8 4
26 8 2
15 8 1
18 7 3
24 7 2
19 7 3
18 7 1
14 7 3