amazon-research / FeatGraph
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 46 units with 600 lines of code in units (85.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (40 lines of code)
    • 1 simple units (43 lines of code)
    • 44 very simple units (517 lines of code)
0% | 0% | 6% | 7% | 86%
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% | 6% | 7% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python/featgraph/util0% | 0% | 36% | 39% | 23%
python/featgraph/module0% | 0% | 0% | 0% | 100%
python/featgraph/op0% | 0% | 0% | 0% | 100%
benchmark0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def util_partition_adj_coo_2d()
in python/featgraph/util/adj_partitioning.py
40 11 3
def util_partition_adj_coo_hilbert()
in python/featgraph/util/adj_partitioning.py
43 10 2
def __init__()
in python/featgraph/module/sddmm.py
33 4 4
def bench_vanilla_sddmm_x86()
in benchmark/bench_vanilla_sddmm.py
27 4 2
def __init__()
in python/featgraph/module/spmm.py
45 3 3
def util_convert_csr_to_dds()
in python/featgraph/util/adj_partitioning.py
26 3 2
def schedule_vanilla_spmm_csr_cuda()
in python/featgraph/op/vanilla_spmm.py
19 3 3
def vanilla_sddmm()
in python/featgraph/op/vanilla_sddmm.py
29 3 5
def schedule_vanilla_sddmm_x86()
in python/featgraph/op/vanilla_sddmm.py
8 3 2
def bench_vanilla_spmm_x86()
in benchmark/bench_vanilla_spmm.py
22 3 2
def bench_vanilla_spmm_cuda()
in benchmark/bench_vanilla_spmm.py
23 3 2
def build()
in python/featgraph/module/spmm.py
18 2 4
def lower_to_ir()
in python/featgraph/module/spmm.py
15 2 4
def run()
in python/featgraph/module/spmm.py
8 2 2
def measure_average_time()
in python/featgraph/module/spmm.py
9 2 3
def _register()
in python/featgraph/module/spmm.py
9 2 1
def edge_mapping()
in python/featgraph/module/sddmm.py
5 2 1
def exp_range()
in benchmark/bench_vanilla_sddmm.py
4 2 3
def bench_vanilla_sddmm_cuda()
in benchmark/bench_vanilla_sddmm.py
24 2 2
def exp_range()
in benchmark/bench_vanilla_spmm.py
4 2 3