opensearch-project / opensearch-cli
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 304 units with 2,894 lines of code in units (69.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (107 lines of code)
    • 21 simple units (538 lines of code)
    • 281 very simple units (2,249 lines of code)
0% | 0% | 3% | 18% | 77%
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% | 3% | 18% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
controller0% | 0% | 11% | 32% | 55%
mapper0% | 0% | 0% | 22% | 77%
gateway0% | 0% | 0% | 11% | 88%
handler0% | 0% | 0% | 27% | 72%
commands0% | 0% | 0% | 3% | 96%
it0% | 0% | 0% | 0% | 100%
client0% | 0% | 0% | 0% | 100%
entity0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in controller/ad/ad.go
63 13 1
func()
in controller/ad/ad.go
44 11 1
func()
in controller/ad/ad.go
35 10 1
func()
in controller/ad/ad.go
34 10 1
func CommandToCurlRequestParameter()
in mapper/platform/platform.go
29 9 1
func()
in controller/ad/ad.go
33 8 1
func()
in controller/ad/ad.go
28 8 1
func()
in controller/profile/profile.go
30 8 1
func NewHTTPGateway()
in gateway/gateway.go
27 7 2
func()
in handler/ad/ad.go
32 7 1
func()
in controller/ad/ad.go
29 7 1
func GetTLSConfig()
in gateway/gateway.go
22 6 1
func()
in gateway/gateway.go
21 6 1
func()
in handler/ad/ad.go
28 6 1
func toHTTPHeaders()
in mapper/platform/platform.go
17 6 1
func MapToCreateDetector()
in mapper/ad/ad.go
32 6 1
func()
in controller/platform/platform.go
19 6 1
func validateCreateRequest()
in controller/ad/ad.go
15 6 1
func()
in controller/ad/ad.go
23 6 1
func()
in controller/ad/ad.go
24 6 1