aws-samples / amazon-lookout-for-equipment
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 102 units with 1,945 lines of code in units (79.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 12 simple units (375 lines of code)
    • 90 very simple units (1,570 lines of code)
0% | 0% | 0% | 19% | 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
py0% | 0% | 0% | 19% | 80%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
utils0% | 0% | 0% | 34% | 65%
apps/cloudwatch-dashboard/lambdas/scheduler-last-execution-details0% | 0% | 0% | 61% | 38%
apps/cloudwatch-dashboard/layers/lookoutequipment0% | 0% | 0% | 27% | 72%
apps/cloudwatch-dashboard/lambdas/scheduler-details0% | 0% | 0% | 22% | 77%
apps/cloudwatch-dashboard/lambdas/list-models0% | 0% | 0% | 8% | 91%
apps/cloudwatch-dashboard/lambdas/list-schedulers0% | 0% | 0% | 0% | 100%
getting_started0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/get-predictions0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/synthetics0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/model-details0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/process-snapshot0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/plot-feature-importance0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/plot-ranked-signals0% | 0% | 0% | 0% | 100%
apps/cloudwatch-dashboard/lambdas/plot-feature-importance-legend0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_model_dashboard()
in apps/cloudwatch-dashboard/lambdas/list-models/handler.py
18 8 2
def build_execution_summary()
in apps/cloudwatch-dashboard/lambdas/scheduler-last-execution-details/handler.py
46 8 3
def get_matching_s3_keys()
in apps/cloudwatch-dashboard/layers/lookoutequipment/python/l4ecwcw.py
18 8 3
def _get_time_ranges()
in utils/lookout_equipment_utils.py
14 8 1
def plot_histograms_v2()
in utils/lookout_equipment_utils.py
56 7 5
def plot_histograms()
in utils/lookout_equipment_utils.py
51 7 3
def set_parameters()
in utils/lookout_equipment_utils.py
41 7 11
def list_inference_executions()
in apps/cloudwatch-dashboard/lambdas/scheduler-last-execution-details/handler.py
26 6 5
def list_inference_executions()
in apps/cloudwatch-dashboard/lambdas/scheduler-details/handler.py
26 6 5
def list_inference_executions()
in apps/cloudwatch-dashboard/layers/lookoutequipment/python/l4ecwcw.py
26 6 5
def list_inference_executions()
in utils/lookout_equipment_utils.py
27 6 5
def create()
in utils/lookout_equipment_utils.py
26 6 1
def adjust_dashboard_ui()
in apps/cloudwatch-dashboard/synthetics/dashboard-snapshot.py
22 5 0
def generate_html_row()
in apps/cloudwatch-dashboard/lambdas/list-schedulers/handler.py
46 5 1
def expand_results()
in apps/cloudwatch-dashboard/layers/lookoutequipment/python/l4ecwcw.py
23 5 1
def crawlerRoleCreation()
in getting_started/RolesGeneratorL4E.py
150 5 2
def plot_signals()
in utils/lookout_equipment_utils.py
45 5 3
def get_model_evaluations_infos()
in apps/cloudwatch-dashboard/lambdas/get-predictions/handler.py
51 4 4
def generate_html_table()
in apps/cloudwatch-dashboard/lambdas/list-models/handler.py
39 4 1
def build_feature_importance_legend()
in apps/cloudwatch-dashboard/lambdas/plot-feature-importance-legend/handler.py
15 4 3