aws-samples / amazon-neptune-samples
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 242 units with 2,654 lines of code in units (8.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (91 lines of code)
    • 5 medium complex units (303 lines of code)
    • 9 simple units (234 lines of code)
    • 227 very simple units (2,026 lines of code)
0% | 3% | 11% | 8% | 76%
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% | 7% | 26% | 7% | 58%
py0% | 0% | 0% | 15% | 84%
js0% | 0% | 0% | 26% | 73%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gremlin/neptune-social-media-utils0% | 11% | 34% | 10% | 42%
gremlin/gremlin-java-client-demo0% | 0% | 10% | 0% | 89%
gremlin/glue-neptune0% | 0% | 0% | 38% | 61%
gremlin/neptune-streams0% | 0% | 0% | 10% | 89%
gremlin/chatbot-full-stack-application0% | 0% | 0% | 26% | 73%
neptune-sagemaker/notebooks0% | 0% | 0% | 31% | 68%
amazon-neptune-and-aws-cdk-for-amundsen/lib0% | 0% | 0% | 0% | 100%
neptune-sagemaker/lambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public IdBean getRandomPairIdForRelation()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/IdStore.java
91 35 0
private ArrayList generateOneRecord()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/CSVGenerator.java
62 17 1
public static GSONSchema configToSchema()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/GSONUtil.java
94 15 1
public void writeEdgeCSVs()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/CSVGenerator.java
63 14 3
public IdBean getRandomIdForRelation()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/IdStore.java
43 13 1
public Cluster create()
in gremlin/gremlin-java-client-demo/src/main/java/org/apache/tinkerpop/gremlin/driver/NeptuneClusterBuilder.java
41 11 0
public static void isValidConfig()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/CSVGenerator.java
33 10 1
def lambda_handler()
in gremlin/neptune-streams/lambda/neptune-streams-demo/neptune_workload.py
31 8 2
def run_job()
in gremlin/glue-neptune/notebooks/glue_utils.py
26 8 1
function registerValidSW()
in gremlin/chatbot-full-stack-application/code/web-ui/neptune-chatbot/src/serviceWorker.js
33 8 2
def clearGremlin()
in neptune-sagemaker/notebooks/util/neptune.py
26 7 6
public static BatchImporterDataMap toDataMap()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/GSONUtil.java
35 7 1
def handle_event()
in gremlin/neptune-streams/lambda/neptune-streams-demo/neptune_stream_handler.py
12 7 3
def parse_sql()
in gremlin/glue-neptune/glue-jobs/common/load_mysql.py
23 7 1
public IdStore()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/IdStore.java
15 6 3
public void configure()
in gremlin/gremlin-java-client-demo/src/main/java/org/apache/tinkerpop/gremlin/driver/LBAwareSigV4WebSocketChannelizer.java
19 5 1
void writeVertexCSV()
in gremlin/neptune-social-media-utils/src/main/java/com/aws/neptune/utils/generator/CSVGenerator.java
29 5 3
def remote_connection()
in gremlin/neptune-streams/lambda/neptune-streams-demo/neptune_python_utils/gremlin_utils.py
15 5 2
export function register()
in gremlin/chatbot-full-stack-application/code/web-ui/neptune-chatbot/src/serviceWorker.js
22 5 1
def handler()
in neptune-sagemaker/lambda/add-iam-role-to-neptune.py
18 4 2