aws-samples / amazon-kinesis-data-analytics-java-examples
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 152 units with 1,345 lines of code in units (62.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (45 lines of code)
    • 151 very simple units (1,300 lines of code)
0% | 0% | 0% | 3% | 96%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
java0% | 0% | 0% | 3% | 96%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
LambdaSink0% | 0% | 0% | 31% | 68%
python0% | 0% | 0% | 0% | 100%
GettingStartedTable0% | 0% | 0% | 0% | 100%
KeyspacesSink0% | 0% | 0% | 0% | 100%
CustomMetrics0% | 0% | 0% | 0% | 100%
CloudWatchSink0% | 0% | 0% | 0% | 100%
HudiConnector0% | 0% | 0% | 0% | 100%
CustomKeystore0% | 0% | 0% | 0% | 100%
Beam0% | 0% | 0% | 0% | 100%
S3ParquetSink0% | 0% | 0% | 0% | 100%
SlidingWindow0% | 0% | 0% | 0% | 100%
SQSSink0% | 0% | 0% | 0% | 100%
GettingStarted_1_80% | 0% | 0% | 0% | 100%
GettingStarted_1_60% | 0% | 0% | 0% | 100%
GettingStarted0% | 0% | 0% | 0% | 100%
GettingStarted_1_110% | 0% | 0% | 0% | 100%
TumblingWindow0% | 0% | 0% | 0% | 100%
FirehoseSink0% | 0% | 0% | 0% | 100%
S3Sink0% | 0% | 0% | 0% | 100%
EfoConsumer0% | 0% | 0% | 0% | 100%
KafkaConnectors0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void invoke()
in LambdaSink/src/main/java/com/amazonaws/services/kinesisanalytics/AwsLambdaSink.java
45 8 2
private static void setupLogGroupAndStream()
in CloudWatchSink/src/main/java/com/amazonaws/services/kinesisanalytics/CustomSinkStreamingJob.java
25 5 3
private void dropFile()
in CustomKeystore/src/main/java/com/amazonaws/services/kinesisanalytics/CustomFlinkKafkaConsumer.java
26 4 1
public TurbineSensorMessageModel reduce()
in KeyspacesSink/src/main/java/com/amazonaws/services/kinesisanalytics/TurbineSpeedAggregator.java
10 3 2
public static void main()
in HudiConnector/src/main/java/basic/application/StreamingJob.java
24 3 1
public void flatMap()
in CustomMetrics/WordCount/src/main/java/com/amazonaws/services/kinesisanalytics/WordCountApplication.java
9 3 2
def property_map()
in python/SlidingWindow/sliding-windows.py
4 3 2
def property_map()
in python/GettingStarted/getting-started.py
4 3 2
def property_map()
in python/S3Sink/streaming-file-sink.py
4 3 2
def property_map()
in python/TumblingWindow/tumbling-windows.py
4 3 2
public void invoke()
in CloudWatchSink/src/main/java/com/amazonaws/services/kinesisanalytics/sink/CloudWatchLogSink.java
13 3 2
private boolean shouldPublish()
in LambdaSink/src/main/java/com/amazonaws/services/kinesisanalytics/AwsLambdaSink.java
9 3 0
public void initializeState()
in LambdaSink/src/main/java/com/amazonaws/services/kinesisanalytics/AwsLambdaSink.java
9 3 1
public static void main()
in GettingStartedTable/src/main/java/com/amazonaws/services/kinesisanalytics/StreamingJob.java
25 3 1
def get_application_properties()
in python/SlidingWindow/sliding-windows.py
8 2 0
def main()
in python/SlidingWindow/sliding-windows.py
27 2 0
def get_application_properties()
in python/GettingStarted/getting-started.py
8 2 0
def main()
in python/GettingStarted/getting-started.py
30 2 0
def get_application_properties()
in python/S3Sink/streaming-file-sink.py
8 2 0
def main()
in python/S3Sink/streaming-file-sink.py
28 2 0