awslabs / amazon-neptune-tools
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 2,022 units with 15,877 lines of code in units (72.5% of code).
    • 2 very long units (374 lines of code)
    • 14 long units (989 lines of code)
    • 143 medium size units (4,313 lines of code)
    • 245 small units (3,537 lines of code)
    • 1,618 very small units (6,664 lines of code)
2% | 6% | 27% | 22% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 10% | 28% | 25% | 23%
java<1% | 5% | 26% | 21% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
neptune-streams-utils100% | 0% | 0% | 0% | 0%
neptune-export<1% | 6% | 26% | 22% | 43%
graphml2csv0% | 64% | 27% | 0% | 8%
csv-gremlin0% | 19% | 51% | 11% | 17%
neptune-python-utils0% | 5% | 15% | 37% | 41%
export-neptune-to-elasticsearch0% | 41% | 37% | 14% | 6%
neptune-gremlin-client0% | 0% | 27% | 19% | 53%
neo4j-to-neptune0% | 0% | 35% | 10% | 53%
csv-to-neptune-bulk-format0% | 0% | 44% | 38% | 17%
drop-graph0% | 0% | 100% | 0% | 0%
glue-neptune0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def provison_neptune_streams_handler()
in neptune-streams-utils/provisioning/provision_neptune_streams_handler.py
272 19 20
public S3ObjectInfo execute()
in neptune-export/src/main/java/com/amazonaws/services/neptune/export/NeptuneExportService.java
102 26 0
def graphml_to_csv()
in graphml2csv/graphml2csv.py
98 2 4
private static TrainingDataWriterConfigV2 getTrainingJobWriterConfig()
in neptune-export/src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/config/TrainingDataWriterConfigV2.java
96 9 3
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
private MasterLabelSchema rewrite()
in neptune-export/src/main/java/com/amazonaws/services/neptune/propertygraph/io/RewriteCsv.java
69 9 3
private MasterLabelSchema rewriteAndMerge()
in neptune-export/src/main/java/com/amazonaws/services/neptune/propertygraph/io/RewriteAndMergeCsv.java
69 8 3
public static NeptuneClusterMetadata createFromClusterId()
in neptune-export/src/main/java/com/amazonaws/services/neptune/cluster/NeptuneClusterMetadata.java
67 3 2
public void run()
in neptune-export/src/main/java/com/amazonaws/services/neptune/RunNeptuneExportSvc.java
65 2 0
private DBClusterParameterGroup createDbClusterParameterGroup()
in neptune-export/src/main/java/com/amazonaws/services/neptune/cluster/AddCloneTask.java
59 6 2
def process_property()
in csv-gremlin/csv-gremlin.py
59 20 3
public void run()
in neptune-export/src/main/java/com/amazonaws/services/neptune/CreatePropertyGraphExportConfig.java
58 3 0
def mapping_for()
in neptune-python-utils/neptune_python_utils/mappings.py
56 21 2
def lambda_bulk_handler()
in export-neptune-to-elasticsearch/lambda/kinesis_to_elasticsearch.py
53 16 2
public Collection exportSpecifications()
in neptune-export/src/main/java/com/amazonaws/services/neptune/propertygraph/Scope.java
52 6 8
private void deleteCluster()
in neptune-export/src/main/java/com/amazonaws/services/neptune/cluster/RemoveCloneTask.java
50 7 1
public void run()
in neptune-gremlin-client/gremlin-client-demo/src/main/java/software/amazon/neptune/RefreshAgentDemo.java
50 7 0
public void addTo()
in neptune-export/src/main/java/com/amazonaws/services/neptune/propertygraph/ExportStats.java
49 5 2
def trigger_neptune_export()
in export-neptune-to-elasticsearch/lambda/export_neptune_to_kinesis.py
48 9 0