amazon-research / FeatGraph
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 46 units with 600 lines of code in units (85.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (375 lines of code)
    • 6 small units (97 lines of code)
    • 28 very small units (128 lines of code)
0% | 0% | 62% | 16% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 62% | 16% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/featgraph/util0% | 0% | 100% | 0% | 0%
benchmark0% | 0% | 92% | 0% | 7%
python/featgraph/op0% | 0% | 50% | 34% | 14%
python/featgraph/module0% | 0% | 38% | 16% | 45%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in python/featgraph/module/spmm.py
45 3 3
def util_partition_adj_coo_hilbert()
in python/featgraph/util/adj_partitioning.py
43 10 2
def util_partition_adj_coo_2d()
in python/featgraph/util/adj_partitioning.py
40 11 3
def vanilla_spmm_dds_x86()
in python/featgraph/op/vanilla_spmm.py
37 1 7
def __init__()
in python/featgraph/module/sddmm.py
33 4 4
def vanilla_sddmm()
in python/featgraph/op/vanilla_sddmm.py
29 3 5
def bench_vanilla_sddmm_x86()
in benchmark/bench_vanilla_sddmm.py
27 4 2
def util_convert_csr_to_dds()
in python/featgraph/util/adj_partitioning.py
26 3 2
def vanilla_spmm_csr_x86()
in python/featgraph/op/vanilla_spmm.py
26 1 5
def bench_vanilla_sddmm_cuda()
in benchmark/bench_vanilla_sddmm.py
24 2 2
def bench_vanilla_spmm_cuda()
in benchmark/bench_vanilla_spmm.py
23 3 2
def bench_vanilla_spmm_x86()
in benchmark/bench_vanilla_spmm.py
22 3 2
def schedule_vanilla_spmm_csr_cuda()
in python/featgraph/op/vanilla_spmm.py
19 3 3
def build()
in python/featgraph/module/spmm.py
18 2 4
def vanilla_spmm_csr_cuda()
in python/featgraph/op/vanilla_spmm.py
18 1 4
def lower_to_ir()
in python/featgraph/module/spmm.py
15 2 4
def schedule_vanilla_spmm_dds_x86()
in python/featgraph/op/vanilla_spmm.py
15 1 1
def schedule_vanilla_sddmm_cuda_tree_reduce()
in python/featgraph/op/vanilla_sddmm.py
12 1 3
def schedule_vanilla_spmm_csr_x86()
in python/featgraph/op/vanilla_spmm.py
10 1 1
def measure_average_time()
in python/featgraph/module/spmm.py
9 2 3