aws / aws-xray-sdk-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 281 units with 1,848 lines of code in units (61.2% 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)
    • 35 small units (510 lines of code)
    • 238 very small units (1,074 lines of code)
0% | 0% | 14% | 27% | 58%
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% | 14% | 27% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/aws-xray-sdk/facets0% | 0% | 40% | 24% | 35%
lib/aws-xray-sdk0% | 0% | 27% | 34% | 37%
lib/aws-xray-sdk/model0% | 0% | 7% | 12% | 80%
lib/aws-xray-sdk/plugins0% | 0% | 26% | 31% | 42%
lib/aws-xray-sdk/sampling0% | 0% | 0% | 43% | 56%
lib/aws-xray-sdk/streaming0% | 0% | 0% | 50% | 50%
lib/aws-xray-sdk/lambda0% | 0% | 0% | 14% | 85%
lib/aws-xray-sdk/context0% | 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%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
call
in lib/aws-xray-sdk/facets/aws_sdk.rb
43 8 1
configure
in lib/aws-xray-sdk/configuration.rb
40 18 1
call
in lib/aws-xray-sdk/facets/rack.rb
35 4 1
request
in lib/aws-xray-sdk/facets/net_http.rb
35 11 3
self.wildcard_match?
in lib/aws-xray-sdk/search_pattern.rb
32 15 3
to_h
in lib/aws-xray-sdk/model/entity.rb
31 17 0
populate_runtime_context
in lib/aws-xray-sdk/recorder.rb
27 7 2
self.do_request
in lib/aws-xray-sdk/plugins/ec2.rb
21 5 1
normalize_exception
in lib/aws-xray-sdk/model/cause.rb
19 4 2
apply_status_code
in lib/aws-xray-sdk/model/entity.rb
19 6 1
applies?
in lib/aws-xray-sdk/sampling/sampling_rule.rb
18 12 1
load_rules
in lib/aws-xray-sdk/sampling/rule_cache.rb
18 3 1
refresh_cache
in lib/aws-xray-sdk/sampling/lead_poller.rb
17 5 0
sample_request?
in lib/aws-xray-sdk/sampling/default_sampler.rb
17 7 1
load_plugins
in lib/aws-xray-sdk/configuration.rb
17 4 1
process_matched_rule
in lib/aws-xray-sdk/sampling/default_sampler.rb
16 4 2
borrow_or_take
in lib/aws-xray-sdk/sampling/reservoir.rb
16 5 2
end_subsegment
in lib/aws-xray-sdk/recorder.rb
16 5 1
self.from_header_string
in lib/aws-xray-sdk/model/trace_header.rb
16 3 1
self.simple_wildcard_match?
in lib/aws-xray-sdk/search_pattern.rb
16 6 2