aws-samples / amazon-cloudwatch-alarms-controller-for-kubernetes
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 103 lines of code in units (5.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (30 lines of code)
    • 2 small units (27 lines of code)
    • 8 very small units (46 lines of code)
0% | 0% | 29% | 26% | 44%
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% | 29% | 26% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cwoperator/helpers0% | 0% | 37% | 33% | 29%
cwoperator0% | 0% | 0% | 0% | 100%
sample/producer0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def build_alarm_body()
in cwoperator/helpers/obj_parser.py
30 1 3
def build_composit_alarm_body()
in cwoperator/helpers/obj_parser.py
16 1 3
def delete_alarm()
in cwoperator/helpers/cloudwatch.py
11 2 1
def put_cloudwatch_alarm()
in cwoperator/helpers/cloudwatch.py
9 3 1
def put_cloudwatch_composit_alarm()
in cwoperator/helpers/cloudwatch.py
9 3 1
def create_fn()
in cwoperator/operator_handler.py
7 1 3
def create_composit_fn()
in cwoperator/operator_handler.py
7 1 3
def delete()
in cwoperator/operator_handler.py
6 1 3
def append_conditionally()
in cwoperator/helpers/obj_parser.py
4 2 3
def cloudwatch_client()
in cwoperator/helpers/cloudwatch.py
2 1 0
def main_function()
in sample/producer/producer.py
2 1 0