microsoft / csa-misc-utils
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 25 units with 205 lines of code in units (5.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (53 lines of code)
    • 4 small units (59 lines of code)
    • 19 very small units (93 lines of code)
0% | 0% | 25% | 28% | 45%
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% | 25% | 28% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sa-dsml-many-models0% | 0% | 19% | 35% | 45%
sample-UpdateManagement0% | 0% | 100% | 0% | 0%
sample-Python-KeyVault-Function0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in sa-dsml-many-models/code/aml_prs/model_train.py
32 7 1
def get_automation_runas_credential()
in sample-UpdateManagement/PowerShell/AzureAutomationRunbooks/RollbackPatches/linRollBack.py
21 2 1
def run()
in sa-dsml-many-models/code/aml_prs/prediction.py
16 3 1
def transform()
in sa-dsml-many-models/code/util/timeseries_utilities.py
16 6 2
def fit()
in sa-dsml-many-models/code/util/timeseries_utilities.py
14 3 3
def forecast()
in sa-dsml-many-models/code/util/timeseries_utilities.py
13 4 2
def _recursive_forecast()
in sa-dsml-many-models/code/util/timeseries_utilities.py
10 3 2
def predict()
in sa-dsml-many-models/code/util/timeseries_utilities.py
9 1 2
def __init__()
in sa-dsml-many-models/code/util/timeseries_utilities.py
9 3 5
def auth_callback()
in sample-Python-KeyVault-Function/init-manual-service-principal.py
9 1 3
def fit()
in sa-dsml-many-models/code/util/timeseries_utilities.py
8 1 3
def __init__()
in sa-dsml-many-models/code/util/timeseries_utilities.py
6 3 3
def fit()
in sa-dsml-many-models/code/util/timeseries_utilities.py
6 1 2
def init()
in sa-dsml-many-models/code/aml_prs/model_train.py
5 1 0
def init()
in sa-dsml-many-models/code/aml_prs/prediction.py
5 1 0
def main()
in sample-Python-KeyVault-Function/init-manual-service-principal.py
4 1 1
def main()
in sample-Python-KeyVault-Function/init-with-msi.py
4 1 1
def __init__()
in sa-dsml-many-models/code/util/timeseries_utilities.py
3 1 2
def __init__()
in sa-dsml-many-models/code/util/timeseries_utilities.py
3 1 3
def fit()
in sa-dsml-many-models/code/util/timeseries_utilities.py
2 1 3