aws-samples / aws-admartech-samples
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 169 units with 2,915 lines of code in units (72.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (265 lines of code)
    • 15 simple units (637 lines of code)
    • 149 very simple units (2,013 lines of code)
0% | 0% | 9% | 21% | 69%
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% | 9% | 21% | 69%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
notebooks/identity-graph/nepytune/usecase0% | 0% | 20% | 22% | 57%
notebooks/identity-graph/nepytune0% | 0% | 24% | 13% | 61%
notebooks/identity-graph/nepytune/cli0% | 0% | 0% | 47% | 52%
notebooks/identity-graph/nepytune/visualizations0% | 0% | 0% | 27% | 72%
notebooks/identity-graph/nepytune/benchmarks0% | 0% | 0% | 7% | 92%
notebooks/identity-graph/nepytune/nodes0% | 0% | 0% | 0% | 100%
notebooks/identity-graph/nepytune/edges0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def draw_referenced_subgraph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/undecided_users.py
43 17 5
def scatters_by_label()
in identity-resolution/notebooks/identity-graph/nepytune/drawing.py
60 13 4
def draw_referenced_subgraph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/similar_audience.py
53 12 4
def _show_most_common_visited_webpages()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/purchase_path.py
64 11 3
def _build_networkx_graph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/user_summary.py
45 11 2
def main()
in identity-resolution/notebooks/identity-graph/nepytune/cli/transform.py
108 10 1
def _build_graph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/similar_audience.py
32 10 2
def generate_identity_groups()
in identity-resolution/notebooks/identity-graph/nepytune/cli/add.py
25 9 4
def _build_networkx_graph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/users_from_household.py
35 9 2
def generate_stats()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/purchase_path.py
32 8 2
def _show_session_stats()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/purchase_path.py
63 8 2
def worker()
in identity-resolution/notebooks/identity-graph/nepytune/benchmarks/drop_graph.py
25 8 2
def show_venn_diagram()
in identity-resolution/notebooks/identity-graph/nepytune/visualizations/venn_diagram.py
124 8 2
def _build_networkx_graph_single()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/purchase_path.py
46 7 3
def edge_scatters_by_label()
in identity-resolution/notebooks/identity-graph/nepytune/drawing.py
33 7 5
def get_query_runner()
in identity-resolution/notebooks/identity-graph/nepytune/benchmarks/query_runner.py
13 7 2
def extend_with_iploc_information()
in identity-resolution/notebooks/identity-graph/nepytune/cli/extend.py
22 6 1
def user_agent_from_type()
in identity-resolution/notebooks/identity-graph/nepytune/cli/add.py
11 6 2
def main()
in identity-resolution/notebooks/identity-graph/nepytune/cli/add.py
44 6 1
def _build_networkx_graph()
in identity-resolution/notebooks/identity-graph/nepytune/usecase/undecided_users.py
24 6 4