awslabs / aws-support-tools
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 139 units with 3,839 lines of code in units (50.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (492 lines of code)
    • 13 medium complex units (1,129 lines of code)
    • 20 simple units (860 lines of code)
    • 103 very simple units (1,358 lines of code)
0% | 12% | 29% | 22% | 35%
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% | 10% | 32% | 24% | 32%
c0% | 20% | 22% | 17% | 39%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
WAF0% | 24% | 34% | 35% | 5%
OpsWorks0% | 20% | 22% | 17% | 39%
EC20% | 23% | 8% | 23% | 44%
MWAA0% | 0% | 36% | 17% | 46%
Connect0% | 0% | 100% | 0% | 0%
SES0% | 0% | 29% | 0% | 70%
Lambda0% | 0% | 41% | 19% | 39%
SNS0% | 0% | 33% | 19% | 46%
Cognito0% | 0% | 30% | 69% | 0%
Elasticsearch Service0% | 0% | 0% | 100% | 0%
APIGateway0% | 0% | 0% | 45% | 54%
DataPipeline0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int main()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/cpulimit.c
180 41 2
def configure()
in EC2/QuickInstanceEC2/qi.py
80 35 0
def crawlConditions()
in WAF/WAF-Enhanced-Replicator/wafget.py
232 26 4
void limit_process()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/cpulimit.c
86 22 3
def lambda_handler()
in Connect/DynamicOutboundCallerID/lambda_function.py
109 19 2
int get_next_process()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/process_iterator_apple.c
39 14 2
def lambda_handler()
in Lambda/Functions/TagEC2Dependencies/tag_ec2_dependencies.py
42 13 2
def lambda_handler()
in SES/SESMailer/ses_mailer.py
53 13 2
def get_images()
in EC2/QuickInstanceEC2/qi.py
27 13 3
def check_iam_permissions()
in MWAA/verify_env/verify_env.py
307 12 2
def validateArguments()
in WAF/WAF-Enhanced-Replicator/waffun.py
28 12 0
def getAssociatedResources()
in WAF/WAF-Enhanced-Replicator/wafget.py
305 12 6
int get_next_process()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/process_iterator_freebsd.c
40 12 2
def lambda_handler()
in SNS/SNSFastPublish/sns_fast_publish.py
34 11 2
def lambda_handler()
in Cognito/decode-verify-jwt/decode-verify-jwt.py
28 11 2
int get_next_process()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/process_iterator_linux.c
31 11 2
def get_instance_properties()
in EC2/QuickInstanceEC2/qi.py
25 10 2
def launch()
in EC2/QuickInstanceEC2/qi.py
29 10 2
def getHomeConfig()
in WAF/WAF-Enhanced-Replicator/waffun.py
41 10 0
int unique_nonzero_ints()
in OpsWorks/sample-cookbooks/cpulimit-ruby/files/default/cpulimit-master/src/process_iterator_apple.c
25 10 3