awslabs / cloudwatch-fluent-metrics
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 52 units with 348 lines of code in units (87.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (47 lines of code)
    • 1 small units (20 lines of code)
    • 49 very small units (281 lines of code)
0% | 0% | 13% | 5% | 80%
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% | 13% | 5% | 80%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fluentmetrics0% | 0% | 13% | 5% | 80%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def log()
in fluentmetrics/metric.py
26 2 2
def flush()
in fluentmetrics/buffer.py
21 6 2
def __init__()
in fluentmetrics/metric.py
20 4 3
def elapsed()
in fluentmetrics/metric.py
10 2 2
def _record_metric()
in fluentmetrics/buffer.py
9 2 2
def countsec()
in fluentmetrics/metric.py
7 1 2
def tbitsec()
in fluentmetrics/metric.py
7 1 2
def gbitsec()
in fluentmetrics/metric.py
7 1 2
def mbitsec()
in fluentmetrics/metric.py
7 1 2
def kbitsec()
in fluentmetrics/metric.py
7 1 2
def bitsec()
in fluentmetrics/metric.py
7 1 2
def tbsec()
in fluentmetrics/metric.py
7 1 2
def gbsec()
in fluentmetrics/metric.py
7 1 2
def mbsec()
in fluentmetrics/metric.py
7 1 2
def kbsec()
in fluentmetrics/metric.py
7 1 2
def bsec()
in fluentmetrics/metric.py
7 1 2
def pct()
in fluentmetrics/metric.py
7 1 2
def tbits()
in fluentmetrics/metric.py
7 1 2
def gbits()
in fluentmetrics/metric.py
7 1 2
def mbits()
in fluentmetrics/metric.py
7 1 2