aws / amazon-ecs-shim-loggers-for-containerd
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 93 units with 1,256 lines of code in units (77.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (77 lines of code)
    • 17 medium size units (533 lines of code)
    • 20 small units (322 lines of code)
    • 55 very small units (324 lines of code)
0% | 6% | 42% | 25% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 6% | 42% | 25% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
logger0% | 14% | 29% | 32% | 24%
ROOT0% | 0% | 48% | 28% | 22%
logger/splunk0% | 0% | 92% | 0% | 7%
logger/awslogs0% | 0% | 84% | 0% | 15%
logger/fluentd0% | 0% | 70% | 0% | 29%
debug0% | 0% | 0% | 49% | 50%
logger/mocks0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in logger/common.go
77 14 1
func getSplunkConfig()
in logger/splunk/logger.go
48 15 1
func run()
in main.go
42 12 0
39 7 0
func()
in logger/awslogs/logger.go
38 5 1
func()
in logger/splunk/logger.go
37 5 1
func()
in logger/fluentd/logger.go
36 5 1
func()
in logger/buffered_logger.go
34 5 1
func()
in logger/common.go
30 5 1
29 6 0
29 3 0
28 5 0
func()
in logger/buffered_logger.go
25 3 1
func()
in logger/buffered_logger.go
25 4 1
func getLogTimestamp()
in logger/common.go
25 5 4
func getAWSLogsConfig()
in logger/awslogs/logger.go
24 5 1
func()
in logger/common.go
23 3 1
21 5 0
20 2 0
20 6 3