aws-cloudformation / cloudformation-cli-java-plugin
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 348 units with 2,896 lines of code in units (53.3% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (324 lines of code)
    • 21 medium size units (652 lines of code)
    • 49 small units (713 lines of code)
    • 273 very small units (1,207 lines of code)
0% | 11% | 22% | 24% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 6% | 21% | 24% | 47%
py0% | 31% | 29% | 23% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/rpdk/java0% | 32% | 29% | 23% | 14%
src/main/java/software/amazon/cloudformation/proxy0% | 13% | 26% | 18% | 42%
python/rpdk/java/templates/init/guided_aws0% | 12% | 29% | 29% | 28%
src/main/java/software/amazon/cloudformation/resource0% | 0% | 43% | 37% | 18%
src/main/java/software/amazon/cloudformation0% | 0% | 20% | 31% | 47%
python/rpdk/java/templates/generate0% | 0% | 21% | 45% | 33%
src/main/java/software/amazon/cloudformation/scheduler0% | 0% | 40% | 0% | 60%
python/rpdk/java/templates/init/default0% | 0% | 0% | 87% | 12%
src/main/java/software/amazon/cloudformation/loggers0% | 0% | 0% | 35% | 64%
src/main/java/software/amazon/cloudformation/metrics0% | 0% | 0% | 29% | 70%
src/main/java/software/amazon/cloudformation/exceptions0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/cloudformation/injection0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
python/rpdk/java/templates/init/shared0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def generate()
in python/rpdk/java/codegen.py
87 6 2
def init_shared()
in python/rpdk/java/codegen.py
71 2 5
private Object readObject()
in src/main/java/software/amazon/cloudformation/proxy/aws/SdkPojoDeserializer.java
58 21 3
public ProgressEvent done()
in src/main/java/software/amazon/cloudformation/proxy/AmazonWebServicesClientProxy.java
57 13 6
protected ProgressEvent handleRequest()
in python/rpdk/java/templates/init/guided_aws/StubUpdateHandler.java
51 3 5
public void processRequest()
in src/main/java/software/amazon/cloudformation/AbstractWrapper.java
47 12 2
protected ProgressEvent handleRequest()
in python/rpdk/java/templates/init/guided_aws/StubDeleteHandler.java
42 2 5
protected ProgressEvent handleRequest()
in python/rpdk/java/templates/init/guided_aws/StubCreateHandler.java
42 2 5
public ProxyClient newProxy()
in src/main/java/software/amazon/cloudformation/proxy/AmazonWebServicesClientProxy.java
41 1 1
static ProxyClient MOCK_PROXY()
in python/rpdk/java/templates/init/guided_aws/AbstractTestBase.java
37 1 2
private Object readEncoded()
in src/main/java/software/amazon/cloudformation/proxy/StdCallbackContext.java
33 8 2
def _write_executable_wrapper_class()
in python/rpdk/java/codegen.py
33 3 3
public static String generateResourceIdentifier()
in src/main/java/software/amazon/cloudformation/resource/IdentifierUtils.java
32 6 4
private void writeObject()
in src/main/java/software/amazon/cloudformation/proxy/aws/SdkPojoSerializer.java
30 13 4
public void testEntrypoint()
in python/rpdk/java/templates/generate/HandlerWrapper.java
30 4 3
def _update_settings()
in python/rpdk/java/codegen.py
30 6 2
public void reportProgress()
in src/main/java/software/amazon/cloudformation/proxy/CloudFormationCallbackAdapter.java
29 5 6
def translate_type()
in python/rpdk/java/resolver.py
29 8 1
private SdkPojo readPojo()
in src/main/java/software/amazon/cloudformation/proxy/aws/SdkPojoDeserializer.java
28 8 3
def init_handlers()
in python/rpdk/java/codegen.py
28 5 4