aws / aws-lambda-runtime-interface-emulator
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 587 units with 5,149 lines of code in units (73.6% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (356 lines of code)
    • 40 medium size units (1,274 lines of code)
    • 86 small units (1,219 lines of code)
    • 456 very small units (2,300 lines of code)
0% | 6% | 24% | 23% | 44%
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% | 24% | 23% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/rapid0% | 29% | 47% | 13% | 9%
cmd/aws-lambda-rie0% | 36% | 27% | 18% | 17%
lambda/rapidcore0% | 4% | 24% | 26% | 44%
lambda/rapi0% | 0% | 34% | 32% | 33%
lambda/core0% | 0% | 7% | 19% | 73%
lambda/appctx0% | 0% | 20% | 12% | 67%
lambda/telemetry0% | 0% | 27% | 12% | 60%
lambda/agents0% | 0% | 0% | 50% | 50%
lambda/logging0% | 0% | 0% | 20% | 80%
lambda/metering0% | 0% | 0% | 51% | 48%
lambda/interop0% | 0% | 0% | 81% | 18%
lambda/runtimecmd0% | 0% | 0% | 50% | 50%
lambda/extensions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func doInvoke()
in lambda/rapid/start.go
82 16 5
func InvokeHandler()
in cmd/aws-lambda-rie/handlers.go
82 18 3
func doInit()
in lambda/rapid/start.go
72 15 3
func shutdownAgents()
in lambda/rapid/graceful_shutdown.go
63 16 8
func()
in lambda/rapidcore/server.go
57 14 1
func()
in lambda/rapi/handler/invocationerror.go
49 8 1
func()
in lambda/rapi/handler/runtimelogs.go
46 9 1
func ReceiveDirectInvoke()
in lambda/core/directinvoke/directinvoke.go
46 6 3
func handleStart()
in lambda/rapid/start.go
45 9 4
func handleInvoke()
in lambda/rapid/start.go
45 8 4
func()
in lambda/rapi/handler/invocationresponse.go
44 10 1
func Start()
in lambda/rapid/sandbox.go
44 2 1
func()
in lambda/rapidcore/server.go
42 11 1
func handleReset()
in lambda/rapid/start.go
42 10 3
func InvokeHandler()
in lambda/rapidcore/standalone/invokeHandler.go
40 10 3
func Execute()
in lambda/rapidcore/standalone/executeHandler.go
38 10 3
func()
in lambda/rapi/handler/agentregister.go
35 8 1
func getBootstrap()
in cmd/aws-lambda-rie/main.go
35 8 2
func()
in lambda/rapi/handler/agentexiterror.go
34 7 1
func()
in lambda/rapi/handler/agentiniterror.go
34 7 1