awslabs / amazon-s3-find-and-forget
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 221 units with 2,755 lines of code in units (23.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (565 lines of code)
    • 14 simple units (330 lines of code)
    • 195 very simple units (1,860 lines of code)
0% | 0% | 20% | 11% | 67%
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% | 25% | 13% | 61%
js0% | 0% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backend/lambdas/tasks0% | 0% | 35% | 20% | 44%
backend/ecs_tasks/delete_files0% | 0% | 26% | 7% | 66%
backend/lambdas/jobs0% | 0% | 28% | 21% | 49%
backend/lambdas/data_mappers0% | 0% | 33% | 0% | 66%
backend/lambda_layers/decorators0% | 0% | 14% | 16% | 69%
backend/lambda_layers/boto_utils0% | 0% | 11% | 6% | 81%
frontend/src0% | 0% | 0% | 37% | 62%
backend/lambdas/queue0% | 0% | 0% | 16% | 83%
frontend/src/components0% | 0% | 0% | 0% | 100%
frontend/src/utils0% | 0% | 0% | 0% | 100%
backend/lambdas/custom_resources0% | 0% | 0% | 0% | 100%
backend/lambdas/settings0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def execute()
in backend/ecs_tasks/delete_files/main.py
113 20 3
def generate_athena_queries()
in backend/lambdas/tasks/generate_queries.py
86 19 3
def handler()
in backend/lambdas/tasks/work_query_queue.py
54 18 2
def validate_mapper()
in backend/lambdas/data_mappers/handlers.py
37 14 1
def sanitize_args()
in backend/lambda_layers/decorators/python/decorators.py
23 13 1
def column_mapper()
in backend/lambdas/tasks/generate_queries.py
54 12 1
def update_status()
in backend/lambdas/jobs/status_updater.py
23 12 2
def delete_matches_from_json_file()
in backend/ecs_tasks/delete_files/json_handler.py
32 11 3
def delete_old_versions()
in backend/ecs_tasks/delete_files/s3.py
43 11 4
def handler()
in backend/lambdas/jobs/stream_processor.py
32 11 2
def list_job_events_handler()
in backend/lambdas/jobs/handlers.py
48 11 2
def paginate()
in backend/lambda_layers/boto_utils/python/boto_utils.py
20 11 4
def _aggregate_stats()
in backend/lambdas/jobs/stats_updater.py
44 10 1
function registerValidSW()
in frontend/src/serviceWorker.js
33 8 2
def get_nested_children()
in backend/lambdas/tasks/generate_queries.py
19 8 2
def make_query()
in backend/lambdas/tasks/execute_query.py
46 8 1
def handler()
in backend/lambdas/tasks/submit_query_results.py
33 8 2
def cast_column_values()
in backend/ecs_tasks/delete_files/parquet_handler.py
10 7 2
def validate_queue_items()
in backend/lambdas/queue/handlers.py
18 7 1
def get_column_info()
in backend/lambdas/tasks/generate_queries.py
15 7 3