aws-quickstart / quickstart-fortinet-fortigate
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 849 units with 16,225 lines of code in units (63.1% of code).
    • 21 very long units (3,765 lines of code)
    • 55 long units (3,819 lines of code)
    • 154 medium size units (4,705 lines of code)
    • 148 small units (2,182 lines of code)
    • 471 very small units (1,754 lines of code)
23% | 23% | 28% | 13% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js23% | 23% | 28% | 13% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/fgt-asg-handler/lib/core35% | 14% | 13% | 13% | 24%
functions/source/nic-attachment/lib/core35% | 14% | 13% | 13% | 24%
functions/source/faz-handler/lib/core35% | 14% | 13% | 13% | 24%
functions/source/fgt-asg-handler/lib/aws16% | 30% | 38% | 12% | 1%
functions/source/nic-attachment/lib/aws16% | 30% | 38% | 12% | 1%
functions/source/faz-handler/lib/aws16% | 30% | 38% | 12% | 1%
functions/source/fgt-asg-handler0% | 49% | 0% | 28% | 22%
functions/source/faz-handler0% | 0% | 58% | 33% | 7%
functions/source/fgt-asg-handler/lib/aws_cfn_response0% | 0% | 92% | 0% | 7%
functions/source/nic-attachment/lib/aws_cfn_response0% | 0% | 92% | 0% | 7%
functions/source/faz-handler/lib/aws_cfn_response0% | 0% | 92% | 0% | 7%
functions/source/nic-attachment0% | 0% | 47% | 27% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async saveSettings()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
351 64 1
async saveSettings()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
351 64 1
async saveSettings()
in functions/source/faz-handler/lib/core/autoscale-handler.js
351 64 1
async handleSyncedCallback()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
246 76 0
async handleSyncedCallback()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
246 76 0
async handleSyncedCallback()
in functions/source/faz-handler/lib/core/autoscale-handler.js
246 76 0
async createVpnConnection()
in functions/source/fgt-asg-handler/lib/aws/index.js
179 20 1
async createVpnConnection()
in functions/source/nic-attachment/lib/aws/index.js
179 20 1
async createVpnConnection()
in functions/source/faz-handler/lib/aws/index.js
179 20 1
async updateLicenseStockRecord()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
159 18 2
async updateLicenseStockRecord()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
159 18 2
async updateLicenseStockRecord()
in functions/source/faz-handler/lib/core/autoscale-handler.js
159 18 2
async handleGetConfig()
in functions/source/fgt-asg-handler/lib/aws/index.js
114 27 0
async handleGetConfig()
in functions/source/nic-attachment/lib/aws/index.js
114 27 0
async handleGetConfig()
in functions/source/faz-handler/lib/aws/index.js
114 27 0
async getInstanceHealthCheck()
in functions/source/fgt-asg-handler/lib/aws/index.js
104 12 2
async getInstanceHealthCheck()
in functions/source/nic-attachment/lib/aws/index.js
104 12 2
async getInstanceHealthCheck()
in functions/source/faz-handler/lib/aws/index.js
104 12 2
async updateTgwRouteTable()
in functions/source/fgt-asg-handler/lib/aws/index.js
102 10 1
async updateTgwRouteTable()
in functions/source/nic-attachment/lib/aws/index.js
102 10 1