awslabs / aws-serverless-data-lake-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 500 units with 8,542 lines of code in units (24.6% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (398 lines of code)
    • 17 medium complex units (1,454 lines of code)
    • 48 simple units (1,590 lines of code)
    • 432 very simple units (5,100 lines of code)
0% | 4% | 17% | 18% | 59%
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% | 4% | 17% | 17% | 59%
scala0% | 0% | 0% | 37% | 62%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sdlf-utils0% | 7% | 26% | 15% | 51%
sdlf-datalakeLibrary0% | 0% | 2% | 23% | 74%
sdlf-foundations0% | 0% | 1% | 39% | 59%
sdlf-stageB0% | 0% | 0% | 0% | 100%
sdlf-stageA0% | 0% | 0% | 0% | 100%
sdlf-pipLibrary0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-pipeline/nested-stacks/lambda/craete-dependencies-by-table/src/lambda_function.py
129 29 2
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-stageB/lambda/stage-b-postupdate-metadata/src/lambda_function.py
177 27 2
def lambda_handler()
in sdlf-utils/pipeline-examples/topic-modelling/stageB/lambda/stage-b-compile-data/src/lambda_function.py
92 26 2
def fillProperties()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
70 24 2
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_b_transforms/heavy_transform_athena.py
100 23 5
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageB/lambda/stage-b-processmanifest/src/lambda_function.py
108 21 2
def transform_object()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas_sqoop.py
176 21 5
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas_sqoop.py
113 20 5
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas.py
113 20 5
def transform_object()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas.py
157 18 5
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-stageA/lambda/stage-a-postupdate-metadata/src/lambda_function.py
146 16 2
def writeTableToTargetBucket()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
76 15 0
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageA/lambda/stage-a-loaddatafile-metadata/src/lambda_function.py
85 13 2
def lambda_handler()
in sdlf-utils/pipeline-examples/datalake-workload-management/sdlf-wlm-integration/sdlf-stageB/lambda/stage-b-routing/src/lambda_function.py
72 13 2
def transform_object()
in sdlf-utils/pipeline-examples/manifests/transforms/heavy_transform_manifest.py
44 12 5
def deleteOldData()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
40 12 1
def adjust_subscriptions()
in sdlf-foundations/lambda/topic/src/lambda_function.py
18 11 2
def lambda_handler()
in sdlf-utils/pipeline-examples/topic-modelling/stageB/lambda/stage-b-kendra-metadata/src/lambda_function.py
52 11 2
def lambda_handler()
in sdlf-utils/pipeline-examples/datalake-workload-management/wlm-standalone/lambda/workload-management/src/lambda_function.py
45 11 2
def _process_sns_notifications()
in sdlf-datalakeLibrary/python/datalake_library/octagon/metric.py
39 11 4