awslabs / aws-c-s3
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 144 units with 4,324 lines of code in units (61.7% of code).
    • 10 very long units (1,336 lines of code)
    • 15 long units (1,026 lines of code)
    • 37 medium size units (1,122 lines of code)
    • 32 small units (493 lines of code)
    • 50 very small units (347 lines of code)
30% | 23% | 25% | 11% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c26% | 24% | 28% | 12% | 8%
ts98% | 0% | 0% | 0% | 1%
py0% | 100% | 0% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source26% | 24% | 28% | 12% | 8%
benchmarks/dashboard-stack/lib97% | 0% | 0% | 0% | 2%
benchmarks/benchmarks-stack/benchmarks-stack/lib100% | 0% | 0% | 0% | 0%
benchmarks/dashboard-stack/lambda0% | 100% | 0% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in benchmarks/dashboard-stack/lib/dashboard-stack.ts
181 9 3
154 24 3
148 22 3
static bool s_s3_copy_object_update()
in source/s3_copy_object.c
146 27 3
133 15 2
129 10 1
static bool s_s3_auto_ranged_get_update()
in source/s3_auto_ranged_get.c
121 23 3
static bool s_s3_auto_ranged_put_update()
in source/s3_auto_ranged_put.c
110 22 3
107 14 4
constructor()
in benchmarks/benchmarks-stack/benchmarks-stack/lib/benchmarks-stack.ts
107 7 3
95 12 2
92 10 7
92 12 3
80 21 5
int aws_s3_paginator_continue()
in source/s3_list_objects.c
74 7 2
67 22 3
static bool s_s3_meta_request_default_update()
in source/s3_default_meta_request.c
63 12 3
60 7 3
60 3 5
60 9 4