awslabs / aws-crt-dotnet
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 248 units with 2,685 lines of code in units (58.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (133 lines of code)
    • 2 medium complex units (95 lines of code)
    • 7 simple units (307 lines of code)
    • 238 very simple units (2,150 lines of code)
0% | 4% | 3% | 11% | 80%
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
cs0% | 6% | 4% | 1% | 86%
c0% | 0% | 0% | 36% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/Elasticurl0% | 39% | 16% | 0% | 43%
aws-crt0% | 0% | 5% | 0% | 94%
native/src0% | 0% | 0% | 36% | 63%
aws-crt-auth0% | 0% | 0% | 8% | 91%
aws-crt-http0% | 0% | 0% | 0% | 100%
aws-crt/IO0% | 0% | 0% | 0% | 100%
aws-crt-cal0% | 0% | 0% | 0% | 100%
aws-crt-checksums0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static void ParseArgs()
in tools/Elasticurl/Elasticurl.cs
133 41 1
static TlsConnectionOptions InitTls()
in tools/Elasticurl/Elasticurl.cs
55 12 0
public PlatformBinding()
in aws-crt/CRT.cs
40 11 0
54 8 6
bool s_tls_args_to_options()
in native/src/tls_ctx_options.c
38 8 11
46 7 3
51 7 8
53 7 7
42 6 4
23 6 2
internal void Validate()
in aws-crt-http/HttpConnection.cs
11 5 0
15 5 3
21 5 2
public AwsSigningConfigNative()
in aws-crt-auth/Signing.cs
25 5 1
16 5 2
20 5 3
public void Complete()
in aws-crt/CrtResult.cs
27 4 1
27 4 1
18 4 0
18 4 3