aws-samples / delivery-driver-app-demo
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 25 units with 325 lines of code in units (17.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (119 lines of code)
    • 10 small units (155 lines of code)
    • 10 very small units (51 lines of code)
0% | 0% | 36% | 47% | 15%
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% | 36% | 47% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
api/routes0% | 0% | 62% | 37% | 0%
api/models0% | 0% | 18% | 67% | 13%
client/plugins0% | 0% | 37% | 46% | 15%
client/store0% | 0% | 0% | 0% | 100%
client/middleware0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
ChimeController.prototype.sendPostRequest = function()
in api/routes/chimeproxy/chimeAPIController.js
27 2 2
ChimeController.prototype.sendPutRequest = function()
in api/routes/chimeproxy/chimeAPIController.js
26 2 2
userModel.getCustomers= function()
in api/models/user/user.model.js
23 4 2
timerCount: function()
in client/plugins/vue-timer.js
22 6 2
ChimeController.prototype.sendGetRequest = function()
in api/routes/chimeproxy/chimeAPIController.js
21 2 1
ChimeController.prototype.sendDeleteRequest = function()
in api/routes/chimeproxy/chimeAPIController.js
20 2 1
userModel.get= function()
in api/models/user/user.model.js
18 2 2
chimeProxyModel.get= function()
in api/models/chimeproxy/chimeproxy.model.js
18 2 1
userModel.updateOrders = function()
in api/models/user/user.model.js
17 3 3
chimeProxyModel.delete = function()
in api/models/chimeproxy/chimeproxy.model.js
16 2 2
data: function()
in client/plugins/vue-timer.js
16 1 0
chimeProxyModel.post = function()
in api/models/chimeproxy/chimeproxy.model.js
15 2 1
function authenticateToken()
in api/routes/authenticateToken.js
13 4 3
var ChimeController = function()
in api/routes/chimeproxy/chimeAPIController.js
11 6 1
mounted()
in client/plugins/vue-timer.js
11 1 0
userModel.post = function()
in api/models/user/user.model.js
9 1 2
chimeProxyModel.put = function()
in api/models/chimeproxy/chimeproxy.model.js
8 1 2
state: function()
in client/store/index.js
6 1 0
calcTime: function()
in client/plugins/vue-timer.js
6 1 1
export default async function()
in client/middleware/guest.js
5 2 2