facebookresearch / iopath
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 144 units with 847 lines of code in units (59.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (128 lines of code)
    • 18 small units (237 lines of code)
    • 122 very small units (482 lines of code)
0% | 0% | 15% | 27% | 56%
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% | 15% | 27% | 56%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
iopath/common0% | 0% | 15% | 28% | 56%
iopath/tabular0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _get_local_path()
in iopath/common/s3.py
40 10 3
def _get_client()
in iopath/common/s3.py
39 3 2
def read()
in iopath/common/s3.py
25 10 2
def _ls()
in iopath/common/s3.py
24 7 3
def _join()
in iopath/common/non_blocking_io.py
18 7 2
def _symlink()
in iopath/common/file_io.py
17 4 4
def __get_open_keys()
in iopath/common/file_io.py
16 5 4
def _mv()
in iopath/common/file_io.py
15 3 4
def get_cache_dir()
in iopath/common/file_io.py
14 3 1
def s3_close_and_upload()
in iopath/common/s3.py
14 4 5
def _read_from_s3()
in iopath/common/s3.py
14 3 2
def flush()
in iopath/common/non_blocking_io.py
13 4 1
def __log_tmetry_keys()
in iopath/common/file_io.py
13 3 4
def _sample_record()
in iopath/common/event_logger.py
12 3 1
def async_join()
in iopath/common/file_io.py
12 6 3
def set_cwd()
in iopath/common/file_io.py
12 6 4
def _head_object()
in iopath/common/s3.py
12 4 2
def _async_join()
in iopath/common/file_io.py
11 3 3
def _open()
in iopath/common/file_io.py
11 1 0
def _set_cwd()
in iopath/common/file_io.py
11 5 4