awslabs / smithy-intellij
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 332 units with 1,622 lines of code in units (48.3% of code).
    • 1 very long units (109 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (31 lines of code)
    • 24 small units (300 lines of code)
    • 306 very small units (1,182 lines of code)
6% | 0% | 1% | 18% | 72%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java6% | 0% | 1% | 18% | 72%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/gen/software/amazon/smithy/plugin/language/psi50% | 0% | 0% | 0% | 49%
src/main/java/software/amazon/smithy/plugin0% | 0% | 24% | 22% | 52%
src/main/gen/software/amazon/smithy/plugin/parser0% | 0% | 0% | 45% | 54%
src/main/gen/software/amazon/smithy/plugin/language/psi/impl0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/language0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/language/psi0% | 0% | 0% | 0% | 100%
src/main/java/software/amazon/smithy/plugin/services0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static PsiElement createElement()
in src/main/gen/software/amazon/smithy/plugin/language/psi/SmithyTypes.java
109 36 1
private void bootstrapCoursier()
in src/main/java/software/amazon/smithy/plugin/SmithyPostStartupActivity.java
31 7 1
private List getBaseCommand()
in src/main/java/software/amazon/smithy/plugin/SmithyPostStartupActivity.java
16 2 4
public static boolean metadata_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
16 10 2
public static boolean apply_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
14 8 2
private static void runCommand()
in src/main/java/software/amazon/smithy/plugin/SmithyPostStartupActivity.java
13 3 1
public static boolean complex_shape_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean node_object_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean node_object_shape_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean shape_member_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean shape_members()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean trait_body()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
public static boolean trait_structure_kvp()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
13 7 2
static boolean idl()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean namespace_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_array()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_object()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean node_value()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean number()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2
public static boolean use_statement()
in src/main/gen/software/amazon/smithy/plugin/parser/SmithyParser.java
12 6 2