awslabs / aws-fluent-plugin-kinesis
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 71 units with 592 lines of code in units (67.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (74 lines of code)
    • 2 medium size units (52 lines of code)
    • 14 small units (196 lines of code)
    • 54 very small units (270 lines of code)
0% | 12% | 8% | 33% | 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% | 14% | 9% | 28% | 47%
rake0% | 0% | 0% | 67% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/fluent/plugin/kinesis_helper0% | 22% | 8% | 27% | 41%
lib/fluent/plugin0% | 0% | 11% | 31% | 56%
benchmark0% | 0% | 0% | 67% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
setup_credentials
in lib/fluent/plugin/kinesis_helper/client.rb
74 34 0
give_up_retries
in lib/fluent/plugin/kinesis_helper/api.rb
29 7 1
data_formatter_create
in lib/fluent/plugin/kinesis.rb
23 5 1
batch_request_with_retry
in lib/fluent/plugin/kinesis_helper/api.rb
18 6 4
rake
create_driver
in benchmark/task.rake
18 6 2
collect_failed_records
in lib/fluent/plugin/kinesis_helper/api.rb
16 4 2
split_to_batches
in lib/fluent/plugin/kinesis_helper/api.rb
15 3 2
client_options
in lib/fluent/plugin/kinesis_helper/client.rb
15 6 0
write
in lib/fluent/plugin/out_kinesis_streams_aggregated.rb
14 1 1
rake
default_config
in benchmark/task.rake
14 2 0
deaggregate
in lib/fluent/plugin/kinesis_helper/aggregator.rb
13 3 1
configure
in lib/fluent/plugin/kinesis_helper/api.rb
13 5 1
rake
setup
in benchmark/task.rake
13 2 0
write
in lib/fluent/plugin/out_kinesis_streams.rb
12 1 1
key_formatter_create
in lib/fluent/plugin/out_kinesis_streams.rb
12 3 0
write
in lib/fluent/plugin/out_kinesis_firehose.rb
12 1 1
format_for_api
in lib/fluent/plugin/kinesis.rb
11 3 1
increment_num_errors
in lib/fluent/plugin/kinesis_helper/api.rb
10 5 0
client_class
in lib/fluent/plugin/kinesis_helper/client.rb
10 3 0
compressor_create
in lib/fluent/plugin/kinesis.rb
10 3 0