aws-samples / aws-codebuild-samples
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 16 units with 331 lines of code in units (12.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (144 lines of code)
    • 5 medium size units (137 lines of code)
    • 1 small units (11 lines of code)
    • 8 very small units (39 lines of code)
0% | 43% | 41% | 3% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 43% | 41% | 3% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ci_tools0% | 52% | 40% | 3% | 3%
ROOT0% | 0% | 47% | 0% | 52%
Alternative Visuals
Longest Units
Top 16 longest units
Unit# linesMcCabe index# params
function handleBuildEvent()
in ci_tools/codecommit_pr_notifications.js
78 16 2
function handleBuildEvent()
in ci_tools/email_notifications.js
66 12 2
function handlePullRequestEvent()
in ci_tools/codecommit_pr_notifications.js
31 3 2
function sendBuildEmail()
in ci_tools/email_notifications.js
31 2 4
function postMessage()
in ci_tools/slack_notifications.js
26 2 2
26 2 0
function processEvent()
in ci_tools/slack_notifications.js
23 4 2
function postComment()
in ci_tools/codecommit_pr_notifications.js
11 2 2
function startBuild()
in ci_tools/codecommit_pr_notifications.js
10 2 2
9 2 0
5 1 2
function parseA()
in service.js
3 1 1
function parseB()
in service.js
3 1 1
exports.add = function()
in calculator.js
3 1 2
3 1 2
3 1 2