aws / aws-xray-sdk-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 322 units with 4,227 lines of code in units (80.8% of code).
    • 1 very complex units (221 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (733 lines of code)
    • 29 simple units (772 lines of code)
    • 279 very simple units (2,501 lines of code)
5% | 0% | 17% | 18% | 59%
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
go5% | 0% | 17% | 18% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
xray8% | 0% | 18% | 21% | 52%
strategy0% | 0% | 19% | 14% | 66%
pattern0% | 0% | 94% | 0% | 6%
daemoncfg0% | 0% | 0% | 27% | 72%
header0% | 0% | 0% | 40% | 59%
awsplugins0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
instrumentation0% | 0% | 0% | 0% | 100%
sample-apps0% | 0% | 0% | 0% | 100%
internal0% | 0% | 0% | 0% | 100%
xraylog0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in xray/response_capturer.go
221 161 1
func newDBAttribute()
in xray/sql_context.go
75 21 6
func stripPasswords()
in xray/sql_context.go
67 18 1
func queryRow()
in xray/sql_context.go
63 17 4
func processManifest()
in strategy/sampling/sampling_rule_manifest.go
47 16 1
func()
in strategy/sampling/centralized.go
63 16 1
func Configure()
in xray/config.go
51 15 1
func()
in strategy/sampling/centralized.go
68 14 1
func WildcardMatch()
in pattern/search_pattern.go
47 13 3
func()
in xray/client.go
58 13 1
func BeginSubsegment()
in xray/segment.go
52 12 2
57 11 4
func newGlobalConfig()
in xray/config.go
48 11 0
func ContextWithConfig()
in xray/config.go
37 11 2
func()
in strategy/sampling/sampling_rule.go
7 10 1
56 10 1
45 10 1
func packSegments()
in xray/default_emitter.go
34 10 2
35 9 4
func()
in xray/httptrace.go
26 9 1