aws / aws-lambda-go
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 107 units with 1,100 lines of code in units (36.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (78 lines of code)
    • 6 simple units (159 lines of code)
    • 99 very simple units (863 lines of code)
0% | 0% | 7% | 14% | 78%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 0% | 7% | 14% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda0% | 0% | 11% | 22% | 65%
events0% | 0% | 6% | 0% | 93%
cmd/build-lambda-zip0% | 0% | 0% | 39% | 60%
cfn0% | 0% | 0% | 29% | 70%
lambda/handlertrace0% | 0% | 0% | 0% | 100%
lambdacontext0% | 0% | 0% | 0% | 100%
lambda/messages0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func NewHandler()
in lambda/handler.go
50 15 1
func unmarshalDynamoDBAttributeValue()
in events/attributevalue.go
28 11 3
func compressExeAndArgs()
in cmd/build-lambda-zip/main.go
37 9 3
func handleInvoke()
in lambda/invoke_loop.go
25 7 2
func()
in cfn/response.go
25 6 1
func()
in lambda/runtime_api_client.go
31 6 1
func()
in lambda/runtime_api_client.go
25 6 1
func validateReturns()
in lambda/handler.go
16 6 1
func unmarshalList()
in events/attributevalue.go
22 5 2
func unmarshalMap()
in events/attributevalue.go
22 5 2
32 5 2
func convertInvokeRequest()
in lambda/invoke_loop.go
29 5 1
func validateArguments()
in lambda/handler.go
14 5 1
func()
in lambda/function.go
34 5 1
func main()
in cmd/build-lambda-zip/main.go
33 5 0
func writeExe()
in cmd/build-lambda-zip/main.go
24 5 3
func unmarshalBinarySet()
in events/attributevalue.go
18 4 2
func unmarshalNumberSet()
in events/attributevalue.go
16 4 2
func unmarshalStringSet()
in events/attributevalue.go
16 4 2
12 4 2