awslabs / aws-dataset-ingestion-metrics-collection-framework
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 62 units with 981 lines of code in units (37.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (190 lines of code)
    • 2 simple units (59 lines of code)
    • 57 very simple units (732 lines of code)
0% | 0% | 19% | 6% | 74%
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% | 19% | 6% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
stacks0% | 0% | 47% | 0% | 52%
definitions0% | 0% | 47% | 0% | 52%
lambda0% | 0% | 0% | 45% | 54%
cdk_constructs0% | 0% | 0% | 0% | 100%
dataquality0% | 0% | 0% | 0% | 100%
accounts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in definitions/definition.py
51 18 2
75 14 1
def generate_dashboard()
in stacks/metrics_streamer.py
64 13 1
def translate_metrics_to_records()
in lambda/metric_stream_producer.py
33 10 5
def translate_clas_to_records()
in lambda/sla_stream_producer.py
26 6 5
def iterate_definitions()
in definitions/definition.py
7 5 2
def __init__()
in cdk_constructs/glue_job_construct.py
228 5 15
def generate_sla_metrics()
in definitions/definition.py
22 4 1
def frequency_to_period()
in dataquality/metric.py
8 4 1
def widget_title()
in dataquality/metric.py
8 4 1
def alarm_unique_id()
in dataquality/metric.py
8 4 1
def unique_id()
in dataquality/metric.py
8 4 1
def frequency_to_period()
in lambda/metric_stream_producer.py
8 4 1
def generate_dashboard_sets()
in stacks/metrics_streamer.py
14 4 1
def metric_data_queries()
in dataquality/stream.py
15 3 2
def api_structure()
in dataquality/metric.py
10 3 1
def fetch_account_central()
in accounts/accounts.py
5 3 1
def fetch_account_streamers()
in accounts/accounts.py
5 3 1
def fetch_account_catalogs()
in accounts/accounts.py
5 3 1
def deploy_definitions_metadata()
in stacks/centralized_resources.py
19 3 1