aws-solutions / discovering-hot-topics-using-machine-learning
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 231 units with 3,396 lines of code in units (45.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (87 lines of code)
    • 21 simple units (710 lines of code)
    • 208 very simple units (2,599 lines of code)
0% | 0% | 2% | 20% | 76%
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% | 4% | 20% | 74%
ts0% | 0% | 0% | 21% | 78%
js0% | 0% | 0% | 20% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambda/capture_news_feed0% | 0% | 13% | 28% | 57%
source/lambda/ingestion-youtube0% | 0% | 14% | 26% | 58%
source/lib/topic-analysis-workflow0% | 0% | 0% | 100% | 0%
source/lambda/quicksight-custom-resources0% | 0% | 0% | 9% | 90%
source/lambda/wf_publish_topic_model0% | 0% | 0% | 40% | 59%
source/lambda/wf-detect-moderation-labels0% | 0% | 0% | 55% | 44%
source/lambda/solution_helper0% | 0% | 0% | 81% | 18%
source/lambda/wf-submit-topic-model0% | 0% | 0% | 56% | 43%
source/lib/awsnodejs-lambda-layer0% | 0% | 0% | 63% | 36%
source/lib/ingestion0% | 0% | 0% | 6% | 93%
source/lib0% | 0% | 0% | 0% | 100%
source/lambda/ingestion-producer0% | 0% | 0% | 0% | 100%
source/lib/text-analysis-workflow0% | 0% | 0% | 0% | 100%
source/lib/solution-helper0% | 0% | 0% | 0% | 100%
source/lambda/firehose_topic_proxy0% | 0% | 0% | 0% | 100%
source/lib/visualization0% | 0% | 0% | 0% | 100%
source/lambda/layers0% | 0% | 0% | 0% | 100%
source/lambda/wf-translate-text0% | 0% | 0% | 0% | 100%
source/lambda/wf-extract-text-in-image0% | 0% | 0% | 0% | 100%
source/lib/aspects0% | 0% | 0% | 0% | 100%
source/lambda/wf-detect-language0% | 0% | 0% | 0% | 100%
source/lambda/wf-analyze-text0% | 0% | 0% | 0% | 100%
source/lib/quicksight-custom-resources0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_and_publish_record()
in source/lambda/capture_news_feed/util/newscatcher_helper.py
52 16 5
def search_comments()
in source/lambda/ingestion-youtube/util/comment.py
35 11 1
def parse_csv_for_mapping()
in source/lambda/wf_publish_topic_model/util/topic.py
22 10 4
def process_config_handler()
in source/lambda/capture_news_feed/lambda_function.py
24 10 2
constructor()
in source/lib/topic-analysis-workflow/topic-orchestration-construct.ts
222 9 3
def is_file_available()
in source/lambda/wf_publish_topic_model/lambda_function.py
31 9 3
def retrieve_urls()
in source/lambda/capture_news_feed/util/config_helper.py
15 8 3
def process_create_request()
in source/lambda/quicksight-custom-resources/lambda_function.py
29 8 1
def build_youtube_search_request()
in source/lambda/ingestion-youtube/util/video.py
26 8 0
async emptyBucket()
in source/lambda/wf-detect-moderation-labels/util/extract-image.js
41 7 2
def custom_resource()
in source/lambda/solution_helper/lambda_function.py
39 7 2
def retrieve_urls_using_json()
in source/lambda/capture_news_feed/util/config_helper.py
22 7 1
def _initialize_identity()
in source/lambda/quicksight-custom-resources/util/quicksight_resource.py
10 7 1
def process_delete_request()
in source/lambda/quicksight-custom-resources/lambda_function.py
24 7 1
def process_service_response()
in source/lambda/ingestion-youtube/util/comment.py
15 7 4
constructor()
in source/lib/ingestion/data-ingestion-template.ts
26 6 3
constructor()
in source/lib/awsnodejs-lambda-layer/layer.ts
30 6 3
def topic_handler()
in source/lambda/wf_publish_topic_model/lambda_function.py
20 6 2
def try_parsing_published_date()
in source/lambda/capture_news_feed/util/newscatcher_helper.py
30 6 1
def get_config()
in source/lambda/capture_news_feed/util/ddb_helper.py
17 6 2