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.
"If you have to spend effort into looking at a fragment of code to figure out what it's doing, then you should extract it into a function and name the function after that 'what'."
"Use common sense, stick to small function sizes in most instances but don't be dogmatic about it if you have a genuinely good reason to make an unusually big function."
"All other things being equal, a shorter method is easier to read, easier to understand, and easier to troubleshoot. Refactor long methods into smaller methods if you can."
"The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that. Functions should not be 100 lines long. Functions should hardly ever be 20 lines long."
Unit Size Overall
There are 1,133 units with 14,992 lines of code in units (74.0% of code).
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
444
90
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
381
85
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
351
77
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
315
75
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
310
52
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
269
72
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
266
50
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
241
71
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
200
38
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
163
31
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
150
30
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
122
29
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
117
33
0
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
107
33
0
function() in lab1/server/src/main/resources/public/js/bootstrap.esm.js
105
15
0
public RegistrationService() in resources/registration-service/src/main/java/com/amazon/aws/partners/saasfactory/RegistrationService.java
98
37
0
public Object handleRequest() in resources/custom-resources/ssm-put-param-secure/src/main/java/com/amazon/aws/partners/saasfactory/SSMPutParamSecure.java
95
13
2
function() in lab1/server/src/main/resources/public/js/bootstrap.bundle.js
89
15
0
public Object handleRequest() in resources/custom-resources/clear-s3-bucket/src/main/java/com/amazon/aws/partners/saasfactory/ClearS3Bucket.java