aws / aws-xray-sdk-ruby
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 281 units with 1,848 lines of code in units (61.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (170 lines of code)
    • 9 simple units (172 lines of code)
    • 266 very simple units (1,506 lines of code)
0% | 0% | 9% | 9% | 81%
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
rb0% | 0% | 9% | 9% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/aws-xray-sdk0% | 0% | 19% | 11% | 68%
lib/aws-xray-sdk/facets0% | 0% | 12% | 26% | 61%
lib/aws-xray-sdk/sampling0% | 0% | 6% | 7% | 85%
lib/aws-xray-sdk/model0% | 0% | 7% | 4% | 88%
lib/aws-xray-sdk/lambda0% | 0% | 0% | 0% | 100%
lib/aws-xray-sdk/plugins0% | 0% | 0% | 0% | 100%
lib/aws-xray-sdk/context0% | 0% | 0% | 0% | 100%
lib/aws-xray-sdk/streaming0% | 0% | 0% | 0% | 100%
lib/aws-xray-sdk/emitter0% | 0% | 0% | 0% | 100%
lib/aws-xray-sdk/segment_naming0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
doc-src/templates/default0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
configure
in lib/aws-xray-sdk/configuration.rb
40 18 1
to_h
in lib/aws-xray-sdk/model/entity.rb
31 17 0
self.wildcard_match?
in lib/aws-xray-sdk/search_pattern.rb
32 15 3
validate
in lib/aws-xray-sdk/sampling/local/sampling_rule.rb
14 13 0
applies?
in lib/aws-xray-sdk/sampling/sampling_rule.rb
18 12 1
request
in lib/aws-xray-sdk/facets/net_http.rb
35 11 3
applies?
in lib/aws-xray-sdk/sampling/local/sampling_rule.rb
10 8 1
extract_request_meta
in lib/aws-xray-sdk/facets/rack.rb
15 8 1
call
in lib/aws-xray-sdk/facets/aws_sdk.rb
43 8 1
sample_request?
in lib/aws-xray-sdk/sampling/default_sampler.rb
17 7 1
populate_runtime_context
in lib/aws-xray-sdk/recorder.rb
27 7 2
get_matched_rule
in lib/aws-xray-sdk/sampling/rule_cache.rb
9 6 2
apply_status_code
in lib/aws-xray-sdk/model/entity.rb
19 6 1
self.simple_wildcard_match?
in lib/aws-xray-sdk/search_pattern.rb
16 6 2
record
in lib/aws-xray-sdk/facets/rails/active_record.rb
16 6 1
stream_subsegments
in lib/aws-xray-sdk/streaming/default_streamer.rb
15 5 2
sample_request?
in lib/aws-xray-sdk/sampling/local/sampler.rb
9 5 1
refresh_cache
in lib/aws-xray-sdk/sampling/lead_poller.rb
17 5 0
rule_valid?
in lib/aws-xray-sdk/sampling/connector.rb
6 5 1
borrow_or_take
in lib/aws-xray-sdk/sampling/reservoir.rb
16 5 2