aws / session-manager-plugin
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 279 units with 3,189 lines of code in units (72.1% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (388 lines of code)
    • 29 medium size units (881 lines of code)
    • 62 small units (880 lines of code)
    • 182 very small units (1,040 lines of code)
0% | 12% | 27% | 27% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 12% | 27% | 27% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/datachannel0% | 17% | 21% | 26% | 34%
src/message0% | 28% | 25% | 29% | 17%
src/sessionmanagerplugin0% | 8% | 40% | 24% | 25%
src/ssmclicommands0% | 19% | 44% | 12% | 23%
src/version0% | 0% | 84% | 0% | 15%
src/communicator0% | 0% | 26% | 17% | 55%
src/log0% | 0% | 8% | 26% | 64%
src/encryption0% | 0% | 0% | 75% | 24%
src/retry0% | 0% | 0% | 91% | 8%
src/websocketutil0% | 0% | 0% | 73% | 26%
src/sdkutil0% | 0% | 0% | 50% | 50%
src/jsonutil0% | 0% | 0% | 22% | 77%
src/ssmcli-main0% | 0% | 0% | 0% | 100%
src/sessionmanagerplugin-main0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in src/datachannel/streaming.go
89 20 1
func ValidateInputAndStartSession()
in src/sessionmanagerplugin/session/session.go
72 17 2
func()
in src/message/messageparser.go
71 12 1
func()
in src/datachannel/streaming.go
54 8 1
func()
in src/ssmclicommands/startsession.go
51 9 1
func()
in src/message/messageparser.go
51 10 1
func()
in src/sessionmanagerplugin/session/portsession/muxportforwarding.go
49 9 1
func()
in src/datachannel/streaming.go
47 7 1
func ParseCliCommand()
in src/ssmclicommands/inputhandler.go
45 10 1
func()
in src/communicator/websocketchannel.go
44 9 1
func()
in src/sessionmanagerplugin/session/portsession/portsession.go
44 7 1
func()
in src/ssmclicommands/startsession.go
41 11 1
func()
in src/sessionmanagerplugin/session/shellsession/shellsession_windows.go
35 9 1
func ValidateInput()
in src/ssmclicommands/inputhandler.go
33 7 2
func putUuid()
in src/message/messageparser.go
32 9 4
func()
in src/sessionmanagerplugin/session/shellsession/shellsession.go
32 7 1
func()
in src/sessionmanagerplugin/session/sessionhandler.go
32 4 1
func getUuid()
in src/message/messageparser.go
29 8 3
func()
in src/datachannel/streaming.go
29 7 1
func LoadLog()
in src/log/defaultconfig.go
28 1 3