aws-robotics / aws-robomaker-bundle-support-library
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 113 units with 1,087 lines of code in units (76.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (111 lines of code)
    • 9 simple units (210 lines of code)
    • 102 very simple units (766 lines of code)
0% | 0% | 10% | 19% | 70%
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% | 10% | 19% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd/cli0% | 0% | 100% | 0% | 0%
pkg/3p/archiver0% | 0% | 15% | 22% | 62%
pkg/bundle0% | 0% | 0% | 29% | 70%
pkg/stream/s30% | 0% | 0% | 23% | 76%
pkg/store0% | 0% | 0% | 0% | 100%
pkg/stream/local0% | 0% | 0% | 0% | 100%
pkg/fs0% | 0% | 0% | 0% | 100%
pkg/stream0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func tarFile()
in pkg/3p/archiver/tar.go
47 14 3
func main()
in cmd/cli/main.go
64 11 0
func hasTarHeader()
in pkg/3p/archiver/tar.go
27 9 1
func untarFile()
in pkg/3p/archiver/tar.go
21 7 3
func()
in pkg/bundle/bundle_v1_extractor.go
21 7 1
func()
in pkg/bundle/provider.go
28 7 1
func()
in pkg/bundle/v2_processor.go
29 7 1
func getOverlays()
in pkg/bundle/v2_processor.go
23 7 1
func writeNewFile()
in pkg/3p/archiver/archiver.go
20 6 3
func()
in pkg/stream/s3/s3_reader.go
21 6 1
func()
in pkg/stream/s3/s3_reader.go
20 6 1
func isTarGz()
in pkg/3p/archiver/targz.go
18 5 1
func writeNewSymbolicLink()
in pkg/3p/archiver/archiver.go
18 5 2
func writeNewHardLink()
in pkg/3p/archiver/archiver.go
18 5 2
func untar()
in pkg/3p/archiver/tar.go
14 5 2
func()
in pkg/stream/local/local_file_streamer.go
19 5 1
func()
in pkg/stream/s3/s3_streamer.go
17 5 1
func()
in pkg/stream/s3/s3_reader.go
21 5 1
func()
in pkg/store/simple_store.go
20 4 1
func()
in pkg/store/simple_store.go
14 4 1