awslabs / amazon-neptune-tools
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 2,022 units with 15,877 lines of code in units (72.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (102 lines of code)
    • 15 medium complex units (944 lines of code)
    • 86 simple units (2,509 lines of code)
    • 1,920 very simple units (12,322 lines of code)
0% | <1% | 5% | 15% | 77%
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% | <1% | 2% | 15% | 80%
py0% | 0% | 22% | 16% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
neptune-export0% | <1% | 2% | 15% | 80%
neptune-streams-utils0% | 0% | 100% | 0% | 0%
csv-gremlin0% | 0% | 33% | 37% | 29%
neptune-python-utils0% | 0% | 8% | 7% | 83%
neptune-gremlin-client0% | 0% | 4% | 11% | 83%
export-neptune-to-elasticsearch0% | 0% | 41% | 37% | 20%
csv-to-neptune-bulk-format0% | 0% | 9% | 35% | 55%
neo4j-to-neptune0% | 0% | 0% | 22% | 77%
drop-graph0% | 0% | 0% | 17% | 82%
graphml2csv0% | 0% | 0% | 0% | 100%
glue-neptune0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public S3ObjectInfo execute()
in neptune-export/src/main/java/com/amazonaws/services/neptune/export/NeptuneExportService.java
102 26 0
def mapping_for()
in neptune-python-utils/neptune_python_utils/mappings.py
56 21 2
def process_property()
in csv-gremlin/csv-gremlin.py
59 20 3
def provison_neptune_streams_handler()
in neptune-streams-utils/provisioning/provision_neptune_streams_handler.py
272 19 20
public void handleRequest()
in neptune-export/src/main/java/com/amazonaws/services/neptune/export/NeptuneExportLambda.java
94 18 3
private void writeRdfs()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/RdfTrainingDataConfigWriter.java
94 17 0
def lambda_bulk_handler()
in export-neptune-to-elasticsearch/lambda/kinesis_to_elasticsearch.py
53 16 2
public void validate()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/parsing/ParseFeaturesV2.java
22 13 0
private void writeNodeFeatures()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/PropertyGraphTrainingDataConfigWriterV2.java
44 13 1
private void writeEdgeFeatures()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/PropertyGraphTrainingDataConfigWriterV2.java
44 13 1
def __init__()
in csv-to-neptune-bulk-format/data_config.py
35 12 4
def upsert_vertex()
in neptune-python-utils/neptune_python_utils/batch_utils.py
28 12 3
public GremlinCluster create()
in neptune-gremlin-client/gremlin-client/src/main/java/software/amazon/neptune/cluster/NeptuneGremlinClusterBuilder.java
42 12 0
private Function retryLogic()
in neptune-gremlin-client/gremlin-client-demo/src/main/java/software/amazon/lambda/NeptuneGremlinClientExampleLambda.java
29 12 0
private void writeAutoInferredFeature()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/PropertyGraphTrainingDataConfigWriterV2.java
30 11 1
def process_edge_row()
in csv-gremlin/csv-gremlin.py
42 11 2
public static GraphElementSchemas fromJson()
in neptune-export/src/main/java/com/amazonaws/services/neptune/propertygraph/schema/GraphElementSchemas.java
38 10 1
public boolean allowAutoInferFeature()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/config/ElementConfig.java
30 10 2
def convert_to_csv()
in csv-to-neptune-bulk-format/csv_converter.py
27 10 1
def process_edges()
in csv-gremlin/csv-gremlin.py
28 10 2