tensorflow / 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 444 units with 4,334 lines of code in units (76.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (674 lines of code)
    • 31 simple units (770 lines of code)
    • 400 very simple units (2,890 lines of code)
0% | 0% | 15% | 17% | 66%
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% | 15% | 17% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_gnn/graph0% | 0% | 17% | 17% | 64%
tensorflow_gnn/graph/keras0% | 0% | 11% | 18% | 69%
tensorflow_gnn/sampler0% | 0% | 63% | 10% | 25%
tensorflow_gnn/tools0% | 0% | 10% | 8% | 81%
tensorflow_gnn/data0% | 0% | 0% | 23% | 76%
ROOT0% | 0% | 0% | 21% | 78%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def encode_subgraph_to_example()
in tensorflow_gnn/sampler/subgraph.py
60 21 2
def call()
in tensorflow_gnn/graph/keras/layers/gat_v2.py
69 19 7
def fill()
in tensorflow_gnn/graph/tensor_utils.py
49 14 3
def _validate_indices()
in tensorflow_gnn/graph/adjacency.py
52 14 1
def __init__()
in tensorflow_gnn/graph/keras/layers/gat_v2.py
65 14 20
def _create_empty_value()
in tensorflow_gnn/graph/graph_piece.py
46 13 1
def random_ragged_tensor()
in tensorflow_gnn/graph/graph_tensor_random.py
47 13 8
def check_required_features()
in tensorflow_gnn/graph/schema_validation.py
41 13 2
def get_io_spec()
in tensorflow_gnn/graph/graph_tensor_io.py
51 12 3
def app_main()
in tensorflow_gnn/tools/print_training_data.py
25 12 1
def _satisfies_total_sizes_internal()
in tensorflow_gnn/graph/padding_ops.py
70 11 5
def _copy_feature_values()
in tensorflow_gnn/graph/graph_tensor_encode.py
30 11 3
def dynamic_batch()
in tensorflow_gnn/graph/batching_utils.py
69 11 2
def _validate_schema_reserved_feature_names()
in tensorflow_gnn/graph/schema_validation.py
20 10 1
def _get_tensor_data()
in tensorflow_gnn/graph/graph_tensor_pprint.py
14 10 1
def pad_to_total_sizes()
in tensorflow_gnn/graph/padding_ops.py
86 9 5
def _check_location()
in tensorflow_gnn/graph/keras/layers/graph_ops.py
14 9 4
def call()
in tensorflow_gnn/graph/keras/layers/map_features.py
34 9 2
def ones_like_leading_dims()
in tensorflow_gnn/graph/tensor_utils.py
26 8 3
def _make_model_or_none()
in tensorflow_gnn/graph/keras/layers/map_features.py
22 8 3