facebookresearch / xR-EgoPose
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 48 units with 381 lines of code in units (78.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (119 lines of code)
    • 7 small units (93 lines of code)
    • 37 very small units (169 lines of code)
0% | 0% | 31% | 24% | 44%
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% | 31% | 24% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
utils0% | 0% | 28% | 27% | 43%
ROOT0% | 0% | 100% | 0% | 0%
dataset0% | 0% | 28% | 29% | 42%
base0% | 0% | 0% | 20% | 79%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in demo.py
36 1 0
def set_action()
in utils/config.py
31 2 0
def set_skeleton()
in utils/config.py
28 2 0
def _index_dir()
in dataset/mocap.py
24 7 2
def get_files()
in utils/io.py
19 8 2
def write_h5()
in utils/io.py
16 8 2
def __getitem__()
in dataset/mocap.py
13 2 2
def _process_points()
in dataset/mocap.py
12 3 2
def read_h5()
in utils/io.py
11 3 1
def format()
in utils/console_logger.py
11 4 2
def __init__()
in base/base_dataset.py
11 3 4
def eval()
in utils/evaluate.py
10 5 4
def eval()
in utils/evaluate.py
10 5 4
def eval()
in utils/evaluate.py
10 5 4
def __call__()
in dataset/transform.py
9 2 2
def __init__()
in utils/console_logger.py
9 1 2
def __call__()
in dataset/transform.py
8 2 2
def load_config()
in utils/config.py
8 1 0
def get_subdirs()
in utils/io.py
8 3 1
def compute_error()
in utils/evaluate.py
8 3 2