GerritCodeReview / zuul_config
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 11 units with 128 lines of code in units (18.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (27 lines of code)
    • 4 small units (61 lines of code)
    • 6 very small units (40 lines of code)
0% | 0% | 21% | 47% | 31%
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% | 21% | 47% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
roles/gcs-upload/library0% | 0% | 21% | 47% | 31%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def cli_main()
in roles/gcs-upload/library/gcs_upload.py
27 2 0
def run()
in roles/gcs-upload/library/gcs_upload.py
19 5 6
def ansible_main()
in roles/gcs-upload/library/gcs_upload.py
17 1 0
def post_thread()
in roles/gcs-upload/library/gcs_upload.py
13 4 2
def upload()
in roles/gcs-upload/library/gcs_upload.py
12 4 2
def retry_function()
in roles/gcs-upload/library/gcs_upload.py
10 4 1
def _post_file()
in roles/gcs-upload/library/gcs_upload.py
10 3 2
def __init__()
in roles/gcs-upload/library/gcs_upload.py
7 4 5
def refresh()
in roles/gcs-upload/library/gcs_upload.py
6 1 2
def with_scopes()
in roles/gcs-upload/library/gcs_upload.py
4 1 3
def _set_path()
in roles/gcs-upload/library/gcs_upload.py
3 1 2