aws / amazon-sagemaker-clarify
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 96 units with 623 lines of code in units (49.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (97 lines of code)
    • 2 medium size units (63 lines of code)
    • 3 small units (47 lines of code)
    • 90 very small units (416 lines of code)
0% | 15% | 10% | 7% | 66%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 15% | 10% | 7% | 66%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/smclarify/util0% | 43% | 0% | 8% | 47%
src/smclarify/bias/metrics0% | 0% | 24% | 10% | 64%
src/smclarify/bias0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def german_lending_readable_values()
in src/smclarify/util/dataset.py
97 1 1
def FT()
in src/smclarify/bias/metrics/posttraining.py
40 20 3
def series_datatype()
in src/smclarify/bias/metrics/common.py
23 18 2
def pdfs_aligned_nonzero()
in src/smclarify/util/__init__.py
19 8 1
def DPL()
in src/smclarify/bias/metrics/common.py
15 3 3
def CI()
in src/smclarify/bias/metrics/pretraining.py
13 3 2
def cache_dir()
in src/smclarify/util/dataset.py
10 1 1
def KL()
in src/smclarify/bias/metrics/pretraining.py
10 3 2
def JS()
in src/smclarify/bias/metrics/pretraining.py
10 4 2
def GaussianFilter()
in src/smclarify/util/__init__.py
9 2 2
def _interval_index()
in src/smclarify/bias/report.py
9 4 2
def _do_report()
in src/smclarify/bias/report.py
9 1 0
def LP_norm()
in src/smclarify/bias/metrics/pretraining.py
9 3 3
def label_value_or_threshold()
in src/smclarify/bias/report.py
8 2 2
def _categorical_metric_call_wrapper()
in src/smclarify/bias/report.py
8 1 0
def _continuous_metric_call_wrapper()
in src/smclarify/bias/report.py
8 1 0
def bias_report()
in src/smclarify/bias/report.py
8 1 0
def _report()
in src/smclarify/bias/report.py
8 1 0
def divide()
in src/smclarify/bias/metrics/common.py
8 5 2
def ensure_local()
in src/smclarify/util/dataset.py
7 3 1