aws / aws-iot-device-sdk-java-v2
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 1,601 units with 8,979 lines of code in units (62.5% of code).
    • 2 very long units (281 lines of code)
    • 3 long units (219 lines of code)
    • 40 medium size units (1,146 lines of code)
    • 63 small units (886 lines of code)
    • 1,493 very small units (6,447 lines of code)
3% | 2% | 12% | 9% | 71%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java3% | 2% | 12% | 9% | 71%
kt0% | 0% | 0% | 37% | 62%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sdk/greengrass/greengrass-client2% | 0% | <1% | 5% | 90%
sdk/greengrass/event-stream-rpc-client24% | 18% | 16% | 19% | 20%
sdk/greengrass/event-stream-rpc-server0% | 26% | 28% | 13% | 32%
sdk/src/main0% | 0% | 49% | 18% | 32%
sdk/greengrass/event-stream-rpc-model0% | 0% | 0% | 15% | 84%
android/app/src0% | 0% | 0% | 37% | 62%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static
in sdk/greengrass/greengrass-client/src/event-stream-rpc-java/model/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCServiceModel.java
149 1 0
public CompletableFuture connect()
in sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCConnection.java
132 20 1
OperationResponse doOperationInvoke()
in sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCClient.java
99 20 3
protected void onConnectRequest()
in sdk/greengrass/event-stream-rpc-server/src/main/java/software/amazon/awssdk/eventstreamrpc/ServiceOperationMappingContinuationHandler.java
61 14 2
final protected void onContinuationMessage()
in sdk/greengrass/event-stream-rpc-server/src/main/java/software/amazon/awssdk/eventstreamrpc/OperationContinuationHandler.java
59 13 4
public MqttClientConnection build()
in sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java
50 12 0
public CompletableFuture discover()
in sdk/src/main/java/software/amazon/awssdk/iot/discovery/DiscoveryClient.java
47 5 1
void handleData()
in sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCClient.java
40 7 8
public GreengrassCoreIPCClientV2 build()
in sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCClientV2.java
39 5 0
public CompletableFuture SubscribeToDescribeJobExecutionRejected()
in sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsClient.java
31 5 4
public CompletableFuture SubscribeToUpdateJobExecutionRejected()
in sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsClient.java
31 5 4
public CompletableFuture SubscribeToUpdateJobExecutionAccepted()
in sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsClient.java
31 5 4
public CompletableFuture SubscribeToDescribeJobExecutionAccepted()
in sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsClient.java
31 5 4
public CompletableFuture SubscribeToGetNamedShadowRejected()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToDeleteNamedShadowRejected()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToGetNamedShadowAccepted()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToNamedShadowUpdatedEvents()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToDeleteNamedShadowAccepted()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToUpdateNamedShadowRejected()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4
public CompletableFuture SubscribeToNamedShadowDeltaUpdatedEvents()
in sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowClient.java
31 5 4