facebookresearch / AugLy
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 744 units with 4,396 lines of code in units (37.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 13 medium size units (392 lines of code)
    • 44 small units (588 lines of code)
    • 687 very small units (3,416 lines of code)
0% | 0% | 8% | 13% | 77%
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% | 8% | 13% | 77%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
augly/text/augmenters0% | 0% | 40% | 13% | 46%
augly/video/augmenters0% | 0% | 22% | 30% | 46%
augly/image0% | 0% | 5% | 9% | 84%
augly/text0% | 0% | 0% | 21% | 78%
augly/video/helpers0% | 0% | 0% | 22% | 77%
augly/video0% | 0% | 0% | 5% | 94%
augly/image/utils0% | 0% | 0% | 14% | 85%
augly/audio0% | 0% | 0% | 2% | 97%
augly/utils0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def substitute()
in augly/text/augmenters/fun_fonts.py
43 14 2
def apply_augmentation()
in augly/video/augmenters/cv2/text.py
41 7 3
def substitute()
in augly/text/augmenters/typo.py
36 8 2
def substitute()
in augly/text/augmenters/letter_replacement.py
32 7 2
def substitute()
in augly/text/augmenters/word_replacement.py
29 7 2
def split()
in augly/text/augmenters/words_augmenter.py
29 4 2
def convert_color()
in augly/image/functional.py
28 1 0
def insert()
in augly/text/augmenters/upside_down.py
28 11 2
def delete()
in augly/text/augmenters/words_augmenter.py
28 5 2
def get_command()
in augly/video/augmenters/ffmpeg/concat.py
25 6 3
def get_command()
in augly/video/augmenters/ffmpeg/audio_swap.py
25 2 3
def __init__()
in augly/image/transforms.py
25 1 0
def apply_augmentation()
in augly/video/augmenters/cv2/shapes.py
23 5 3
def get_command()
in augly/video/augmenters/ffmpeg/trim.py
19 5 3
def extract_audio_to_file()
in augly/video/helpers/ffmpeg.py
19 2 2
def __init__()
in augly/text/augmenters/upside_down.py
19 1 5
def substitute_contractions()
in augly/text/augmenters/contraction.py
18 5 2
def get_command()
in augly/video/augmenters/ffmpeg/aspect_ratio.py
17 3 3
def get_command()
in augly/video/augmenters/ffmpeg/stack.py
17 1 3
def __init__()
in augly/video/augmenters/ffmpeg/concat.py
15 3 3