aws-cloudformation / aws-cloudformation-resource-providers-iot
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 294 units with 4,667 lines of code in units (60.2% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (401 lines of code)
    • 85 medium size units (2,797 lines of code)
    • 56 small units (788 lines of code)
    • 147 very small units (681 lines of code)
0% | 8% | 59% | 16% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 8% | 59% | 16% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws-iot-accountauditconfiguration0% | 33% | 45% | 10% | 10%
aws-iot-certificate0% | 25% | 47% | 16% | 11%
aws-iot-provisioningtemplate0% | 24% | 47% | 4% | 23%
aws-iot-domainconfiguration0% | 19% | 52% | 8% | 19%
aws-iot-jobtemplate0% | 29% | 57% | 0% | 12%
aws-iot-securityprofile0% | 0% | 63% | 14% | 22%
aws-iot-mitigationaction0% | 0% | 76% | 15% | 7%
aws-iot-dimension0% | 0% | 73% | 16% | 10%
aws-iot-custommetric0% | 0% | 69% | 20% | 9%
aws-iot-scheduledaudit0% | 0% | 68% | 21% | 9%
aws-iot-resourcespecificlogging0% | 0% | 76% | 11% | 12%
aws-iot-logging0% | 0% | 85% | 6% | 8%
aws-iot-authorizer0% | 0% | 34% | 48% | 17%
aws-iot-policy0% | 0% | 26% | 45% | 27%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static AuditCheckConfigurations translateChecksFromIotToCfn()
in aws-iot-accountauditconfiguration/src/main/java/com/amazonaws/iot/accountauditconfiguration/Translator.java
75 15 1
public ProgressEvent handleRequest()
in aws-iot-certificate/src/main/java/com/amazonaws/iot/certificate/CreateHandler.java
74 12 4
public ProgressEvent handleRequest()
in aws-iot-provisioningtemplate/src/main/java/com/amazonaws/iot/provisioningtemplate/UpdateHandler.java
70 10 4
static Map translateChecksFromCfnToIot()
in aws-iot-accountauditconfiguration/src/main/java/com/amazonaws/iot/accountauditconfiguration/Translator.java
64 16 1
public ProgressEvent handleRequest()
in aws-iot-domainconfiguration/src/main/java/com/amazonaws/iot/domainconfiguration/CreateHandler.java
61 7 4
public ProgressEvent handleRequest()
in aws-iot-jobtemplate/src/main/java/software/amazon/iot/jobtemplate/CreateHandler.java
57 10 4
static MitigationActionParams translateActionParamsToSdk()
in aws-iot-mitigationaction/src/main/java/com/amazonaws/iot/mitigationaction/Translator.java
48 7 1
static ActionParams translateActionParamsToCfn()
in aws-iot-mitigationaction/src/main/java/com/amazonaws/iot/mitigationaction/Translator.java
48 7 1
String updateSecurityProfile()
in aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/UpdateHandler.java
47 4 3
public ProgressEvent handleRequest()
in aws-iot-jobtemplate/src/main/java/software/amazon/iot/jobtemplate/ReadHandler.java
46 9 4
public ProgressEvent handleRequest()
in aws-iot-accountauditconfiguration/src/main/java/com/amazonaws/iot/accountauditconfiguration/CreateHandler.java
44 5 4
public ProgressEvent handleRequest()
in aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/CreateHandler.java
43 7 4
void updateTags()
in aws-iot-mitigationaction/src/main/java/com/amazonaws/iot/mitigationaction/UpdateHandler.java
42 5 4
void updateTags()
in aws-iot-custommetric/src/main/java/com/amazonaws/iot/custommetric/UpdateHandler.java
42 5 4
void updateTags()
in aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/UpdateHandler.java
42 5 4
public ProgressEvent handleRequest()
in aws-iot-logging/src/main/java/software/amazon/iot/logging/CreateHandler.java
42 7 4
public ProgressEvent handleRequest()
in aws-iot-logging/src/main/java/software/amazon/iot/logging/DeleteHandler.java
42 5 4
public ProgressEvent handleRequest()
in aws-iot-resourcespecificlogging/src/main/java/software/amazon/iot/resourcespecificlogging/UpdateHandler.java
42 5 4
void updateTags()
in aws-iot-scheduledaudit/src/main/java/com/amazonaws/iot/scheduledaudit/UpdateHandler.java
42 5 4
void updateTags()
in aws-iot-dimension/src/main/java/com/amazonaws/iot/dimension/UpdateHandler.java
42 5 4