awslabs / amazon-eks-irsa-cfn
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 28 units with 346 lines of code in units (47.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (153 lines of code)
    • 7 small units (98 lines of code)
    • 17 very small units (95 lines of code)
0% | 0% | 44% | 28% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 50% | 37% | 12%
ts0% | 0% | 39% | 21% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 0% | 39% | 21% | 39%
lambda-packages/role_handler0% | 0% | 34% | 50% | 14%
lambda-packages/identity_provider_handler0% | 0% | 92% | 0% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in lib/role.ts
48 7 3
const report = function()
in lambda-packages/identity_provider_handler/index.js
39 4 6
const report = function()
in lambda-packages/role_handler/index.js
39 4 6
constructor()
in lib/identityprovider.ts
27 2 3
Policies: _flatten()
in lib/role.ts
19 4 1
const getAssumeRolePolicy = function()
in lambda-packages/role_handler/index.js
18 1 4
AssumeRolePolicyDocument: getAssumeRolePolicy()
in lambda-packages/role_handler/index.js
14 1 1
await getAccountId()
in lambda-packages/role_handler/index.js
13 1 0
await getIssuer()
in lambda-packages/role_handler/index.js
12 1 1
function _flatten()
in lib/role.ts
11 4 1
11 4 2
public attach()
in lib/util.ts
9 3 1
public addToPolicy()
in lib/role.ts
8 2 1
8 2 1
public grant()
in lib/role.ts
8 1 2
8 3 1
7 2 0
7 1 2
7 2 1
6 3 1