facebookresearch / shaDow_GNN
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 279 units with 3,903 lines of code in units (51.8% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (220 lines of code)
    • 18 medium complex units (826 lines of code)
    • 41 simple units (963 lines of code)
    • 217 very simple units (1,894 lines of code)
0% | 5% | 21% | 24% | 48%
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% | 6% | 15% | 24% | 53%
cpp0% | 0% | 51% | 25% | 22%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
shaDow0% | 9% | 11% | 22% | 55%
para_graph_sampler/graph_engine0% | 0% | 34% | 27% | 37%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_n_prepare()
in shaDow/utils.py
111 31 5
43 29 6
def postprocessing()
in shaDow/main.py
66 29 6
def build_extension()
in para_graph_sampler/graph_engine/backend/setup.py
37 23 2
bool ParallelSampler::read_PPR_from_binary_file()
in para_graph_sampler/graph_engine/backend/ParallelSampler.cpp
87 22 5
void ParallelSampler::preproc_ppr_approximate()
in para_graph_sampler/graph_engine/backend/ParallelSampler.cpp
104 22 6
SubgraphStruct ParallelSampler::_node_induced_subgraph()
in para_graph_sampler/graph_engine/backend/ParallelSampler.cpp
98 22 5
def instantiate_sampler()
in shaDow/minibatch.py
55 20 7
def par_sample_ensemble()
in para_graph_sampler/graph_engine/frontend/samplers_ensemble.py
24 18 2
def complexity()
in shaDow/layers.py
32 16 3
def __post_init__()
in para_graph_sampler/graph_engine/frontend/graph.py
30 15 6
def end_training()
in shaDow/logging_base.py
38 15 2
def _sort_sampler_order()
in para_graph_sampler/graph_engine/frontend/samplers_ensemble.py
27 13 3
def forward()
in shaDow/layers.py
45 13 4
def cat_to_block_diagonal()
in para_graph_sampler/graph_engine/frontend/graph.py
39 12 2
def _extract_subgraph_return()
in para_graph_sampler/graph_engine/frontend/samplers_ensemble.py
40 12 5
std::vector ParallelSampler::parallel_sampler_ensemble()
in para_graph_sampler/graph_engine/backend/ParallelSampler.cpp
43 12 2
def log_key_step()
in shaDow/logging_base.py
42 12 4
def is_PPR_file_exists()
in para_graph_sampler/graph_engine/frontend/samplers_cpp.py
31 11 2
def one_epoch()
in shaDow/main.py
25 11 8