facebookresearch / FBTT-Embedding
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 30 units with 492 lines of code in units (15.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (142 lines of code)
    • 2 simple units (170 lines of code)
    • 27 very simple units (180 lines of code)
0% | 0% | 28% | 34% | 36%
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% | 28% | 34% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 28% | 34% | 36%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def reset_parameters()
in tt_embeddings_ops.py
142 17 2
def _auto_shape()
in tt_embeddings_ops.py
30 10 2
def backward()
in tt_embeddings_ops.py
140 6 2
def validate_list()
in tt_embeddings_benchmark.py
10 4 3
def __init__()
in tt_embeddings_ops.py
9 2 3
def extend()
in tt_embeddings_ops.py
5 2 2
def __next__()
in tt_embeddings_ops.py
6 2 1
def reset_cache()
in tt_embeddings_ops.py
5 2 1
def cache_populate()
in tt_embeddings_ops.py
15 2 1
def update_cache()
in tt_embeddings_ops.py
3 2 2
def get_params()
in tt_embeddings_ops.py
5 2 1
def get_table_batched_offsets_from_dense()
in tt_embeddings_benchmark.py
2 1 0
def generate_requests()
in tt_embeddings_benchmark.py
11 1 0
def benchmark_requests()
in tt_embeddings_benchmark.py
3 1 0
def main()
in tt_embeddings_benchmark.py
11 1 0
def __str__()
in tt_embeddings_ops.py
2 1 1
def append()
in tt_embeddings_ops.py
4 1 2
def __len__()
in tt_embeddings_ops.py
2 1 1
def __iter__()
in tt_embeddings_ops.py
3 1 1
def __getitem__()
in tt_embeddings_ops.py
2 1 2