awslabs / aws-crt-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 88 units with 817 lines of code in units (34.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 7 simple units (213 lines of code)
    • 81 very simple units (604 lines of code)
0% | 0% | 0% | 26% | 73%
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% | 0% | 26% | 73%
rake0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gems/aws-sigv4/lib/aws-sigv40% | 0% | 0% | 38% | 61%
gems/aws-crt/lib/aws-crt0% | 0% | 0% | 16% | 83%
gems/aws-sigv4/spec0% | 0% | 0% | 68% | 31%
gems/aws-crt/ext0% | 0% | 0% | 0% | 100%
gems/aws-crt/spec0% | 0% | 0% | 0% | 100%
tasks0% | 0% | 0% | 0% | 100%
gems/aws-crt/spec/checksums0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
presign_url
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
39 9 1
initialize
in gems/aws-crt/lib/aws-crt/auth/credentials.rb
26 8 0
initialize
in gems/aws-crt/lib/aws-crt/auth/static_credentials_provider.rb
23 7 0
self.attach_function
in gems/aws-crt/lib/aws-crt/native.rb
20 7 4
sha256_hexdigest
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
16 7 1
parse_request
in gems/aws-sigv4/spec/spec_helper.rb
41 7 2
sign_request
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
48 6 1
initialize
in gems/aws-crt/lib/aws-crt/io/event_loop_group.rb
12 5 1
initialize
in gems/aws-sigv4/lib/aws-sigv4/credentials.rb
12 5 1
host_os
in gems/aws-crt/lib/aws-crt/platforms.rb
12 4 0
self.sign_request
in gems/aws-crt/lib/aws-crt/auth/signer.rb
25 4 0
headers
in gems/aws-crt/lib/aws-crt/http/message.rb
9 4 0
extract_credentials_provider
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
9 4 1
set?
in gems/aws-sigv4/lib/aws-sigv4/credentials.rb
6 4 0
host_cpu
in gems/aws-crt/lib/aws-crt/platforms.rb
10 3 0
native
in gems/aws-crt/lib/aws-crt/managed_native.rb
4 3 1
self.decode
in gems/aws-crt/lib/aws-crt/string_blob.rb
11 3 1
self.error_class
in gems/aws-crt/lib/aws-crt/errors.rb
11 3 1
to_blob
in gems/aws-crt/lib/aws-crt/native.rb
4 3 0
props
in gems/aws-crt/lib/aws-crt/native.rb
11 3 0