awslabs / kinesis-aggregation
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 267 units with 2,456 lines of code in units (72.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (163 lines of code)
    • 16 simple units (487 lines of code)
    • 248 very simple units (1,806 lines of code)
0% | 0% | 6% | 19% | 73%
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
js0% | 0% | 22% | 36% | 41%
py0% | 0% | 8% | 23% | 67%
java0% | 0% | 0% | 8% | 91%
go0% | 0% | 0% | 23% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
node/lib0% | 0% | 31% | 41% | 27%
python/aws_kinesis_agg0% | 0% | 11% | 28% | 59%
go/v20% | 0% | 0% | 23% | 76%
go/deaggregator0% | 0% | 0% | 80% | 19%
node/example0% | 0% | 0% | 22% | 77%
java/KinesisAggregator0% | 0% | 0% | 10% | 89%
java/KinesisAggregatorV20% | 0% | 0% | 11% | 88%
java/KinesisDeaggregatorV20% | 0% | 0% | 25% | 75%
java/KinesisDeaggregator0% | 0% | 0% | 30% | 70%
python0% | 0% | 0% | 10% | 89%
java/KinesisTestProducers0% | 0% | 0% | 0% | 100%
go/records0% | 0% | 0% | 0% | 100%
java/KinesisLambdaForwarder0% | 0% | 0% | 0% | 100%
java/KinesisTestConsumers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def add_user_record()
in python/aws_kinesis_agg/aggregator.py
37 14 4
50 13 3
76 13 4
func DeaggregateRecords()
in go/deaggregator/deaggregator.go
41 10 1
func DeaggregateRecords()
in go/v2/deaggregator/deaggregator.go
41 10 1
function calculateRecordSize()
in node/lib/kpl-agg.js
42 10 2
38 9 1
def iter_deaggregate_records()
in python/aws_kinesis_agg/deaggregator.py
50 9 2
public boolean addUserRecord()
in java/KinesisAggregator/src/main/java/com/amazonaws/kinesis/agg/AggRecord.java
34 8 3
public boolean addUserRecord()
in java/KinesisAggregatorV2/src/main/java/com/amazonaws/kinesis/agg/AggRecord.java
34 8 3
function aggregateRecord()
in node/lib/kpl-agg.js
57 8 1
private List convertType()
in java/KinesisDeaggregatorV2/src/main/java/com/amazonaws/kinesis/deagg/RecordDeaggregator.java
18 7 1
function generateEncodedRecord()
in node/lib/kpl-agg.js
30 7 1
private List convertType()
in java/KinesisDeaggregator/src/main/java/com/amazonaws/kinesis/deagg/RecordDeaggregator.java
15 6 1
var handleNoProcess = function()
in node/example/sample-aggregation.js
19 6 2
var handleNoProcess = function()
in node/example/sample-deaggregation.js
18 6 2
def copy_source_to_build_dir()
in python/make_lambda_build.py
11 6 0
def _calculate_varint_size()
in python/aws_kinesis_agg/aggregator.py
14 6 1
def _calculate_record_size()
in python/aws_kinesis_agg/aggregator.py
25 6 4
private int calculateVarintSize()
in java/KinesisAggregator/src/main/java/com/amazonaws/kinesis/agg/AggRecord.java
19 5 1