awslabs / aws-crt-ruby
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 88 units with 817 lines of code in units (34.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (264 lines of code)
    • 14 small units (185 lines of code)
    • 66 very small units (368 lines of code)
0% | 0% | 32% | 22% | 45%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 0% | 32% | 22% | 44%
rake0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gems/aws-crt/lib/aws-crt0% | 0% | 24% | 24% | 50%
gems/aws-sigv4/lib/aws-sigv40% | 0% | 32% | 25% | 41%
gems/aws-sigv4/spec0% | 0% | 68% | 26% | 5%
gems/aws-crt/ext0% | 0% | 63% | 0% | 36%
gems/aws-crt/spec0% | 0% | 0% | 0% | 100%
tasks0% | 0% | 0% | 0% | 100%
gems/aws-crt/spec/checksums0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
sign_request
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
48 6 1
parse_request
in gems/aws-sigv4/spec/spec_helper.rb
41 7 2
presign_url
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
39 9 1
compile_bin
in gems/aws-crt/ext/compile.rb
36 2 0
initialize
in gems/aws-crt/lib/aws-crt/auth/signing_config.rb
26 2 1
initialize
in gems/aws-crt/lib/aws-crt/auth/credentials.rb
26 8 0
self.sign_request
in gems/aws-crt/lib/aws-crt/auth/signer.rb
25 4 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
split_query_to_params
in gems/aws-sigv4/spec/spec_helper.rb
16 3 1
initialize
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
15 1 1
event_string_to_sign
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
13 1 5
host_os
in gems/aws-crt/lib/aws-crt/platforms.rb
12 4 0
initialize
in gems/aws-crt/lib/aws-crt/auth/credentials.rb
12 1 0
initialize
in gems/aws-crt/lib/aws-crt/auth/static_credentials_provider.rb
12 1 0
initialize
in gems/aws-crt/lib/aws-crt/io/event_loop_group.rb
12 5 1
sign_event
in gems/aws-sigv4/lib/aws-sigv4/signer.rb
12 1 3
initialize
in gems/aws-sigv4/lib/aws-sigv4/credentials.rb
12 5 1
self.decode
in gems/aws-crt/lib/aws-crt/string_blob.rb
11 3 1