opensearch-project / opensearch-ci
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 13 units with 551 lines of code in units (44.8% of code).
    • 2 very long units (287 lines of code)
    • 1 long units (64 lines of code)
    • 4 medium size units (129 lines of code)
    • 4 small units (58 lines of code)
    • 2 very small units (13 lines of code)
52% | 11% | 23% | 10% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts52% | 11% | 23% | 10% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/compute82% | 0% | 6% | 8% | 2%
lib0% | 65% | 34% | 0% | 0%
lib/monitoring0% | 0% | 100% | 0% | 0%
lib/network0% | 0% | 100% | 0% | 0%
lib/security0% | 0% | 0% | 100% | 0%
lib/auditing0% | 0% | 0% | 100% | 0%
lib/constructs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
public static configElements()
in lib/compute/jenkins-main-node.ts
157 14 4
public asInitFile()
in lib/compute/agent-nodes.ts
130 1 5
constructor()
in lib/ci-stack.ts
64 5 3
constructor()
in lib/monitoring/ci-alarms.ts
48 1 3
constructor()
in lib/ci-config-stack.ts
33 1 3
constructor()
in lib/compute/agent-node-config.ts
24 1 1
constructor()
in lib/network/ci-external-load-balancer.ts
24 4 2
constructor()
in lib/security/ci-security-groups.ts
17 2 3
public static oidcConfigFields()
in lib/compute/jenkins-main-node.ts
15 1 0
constructor()
in lib/compute/agent-nodes.ts
14 1 1
constructor()
in lib/auditing/ci-audit-logging.ts
12 1 1
public configElements()
in lib/compute/agent-nodes.ts
9 1 4
public static asInitFile()
in lib/constructs/cloudwatch-agent.ts
4 1 3