awslabs / amazon-ecr-containerd-resolver
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 72 units with 1,410 lines of code in units (80.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (243 lines of code)
    • 14 simple units (510 lines of code)
    • 55 very simple units (657 lines of code)
0% | 0% | 17% | 36% | 46%
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% | 17% | 36% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
example/ecr-pull0% | 0% | 67% | 18% | 13%
ecr0% | 0% | 8% | 26% | 65%
example/ecr-push0% | 0% | 0% | 71% | 28%
ecr/stream0% | 0% | 0% | 76% | 23%
example/ecr-copy0% | 0% | 0% | 82% | 17%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func showProgress()
in example/ecr-pull/progress.go
106 22 4
func()
in ecr/resolver.go
69 12 1
func main()
in example/ecr-pull/main.go
68 12 0
46 9 1
func()
in ecr/layer_writer.go
40 9 1
28 8 2
func()
in ecr/stream/chunked_processor.go
24 8 1
func main()
in example/ecr-copy/main.go
43 8 0
func main()
in example/ecr-push/main.go
56 8 0
func()
in ecr/base.go
32 7 1
func()
in ecr/manifest_writer.go
46 7 1
func Display()
in example/ecr-pull/progress.go
48 7 3
func display()
in example/ecr-push/progress.go
48 7 3
func displayUploadProgress()
in example/ecr-push/main.go
29 7 3
func NewResolver()
in ecr/resolver.go
26 6 1
func()
in ecr/stream/chunked_processor.go
22 6 1
func()
in ecr/stream/chunked_processor.go
22 6 1
func()
in ecr/resolver.go
21 5 1
func()
in ecr/fetcher.go
25 5 1
func newLayerWriter()
in ecr/layer_writer.go
78 5 4