aws / ec2-macos-system-monitor
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 23 units with 308 lines of code in units (77.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (53 lines of code)
    • 3 medium size units (98 lines of code)
    • 4 small units (55 lines of code)
    • 15 very small units (102 lines of code)
0% | 17% | 31% | 17% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 17% | 31% | 17% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 100% | 0% | 0% | 0%
lib/ec2macossystemmonitor0% | 0% | 38% | 21% | 40%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func main()
in main.go
53 12 0
func BuildMessage()
in lib/ec2macossystemmonitor/relayd.go
45 7 3
func()
in lib/ec2macossystemmonitor/relayd.go
28 8 1
func NewRelay()
in lib/ec2macossystemmonitor/relayd.go
25 6 1
func PassToRelayd()
in lib/ec2macossystemmonitor/relayd.go
15 4 1
func NewSerialConnection()
in lib/ec2macossystemmonitor/serial.go
14 3 1
func()
in lib/ec2macossystemmonitor/serial.go
13 3 1
func NewLogger()
in lib/ec2macossystemmonitor/logging.go
13 4 3
func()
in lib/ec2macossystemmonitor/logging.go
10 2 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/logging.go
8 3 1
func()
in lib/ec2macossystemmonitor/serial.go
7 2 1
func SendMessage()
in lib/ec2macossystemmonitor/relayd.go
7 2 3
func RunningCpuUsage()
in lib/ec2macossystemmonitor/cpuutilization.go
7 2 0
func fileExists()
in lib/ec2macossystemmonitor/util.go
7 2 1
func()
in lib/ec2macossystemmonitor/relayd.go
5 1 1