aws-samples / amazon-textract-response-parser
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 405 units with 2,466 lines of code in units (55.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (96 lines of code)
    • 24 medium size units (636 lines of code)
    • 30 small units (458 lines of code)
    • 350 very small units (1,276 lines of code)
0% | 3% | 25% | 18% | 51%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 12% | 24% | 10% | 52%
py0% | 0% | 20% | 24% | 55%
cs0% | 0% | 45% | 14% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src-js/src0% | 12% | 24% | 10% | 52%
src-python/trp0% | 0% | 22% | 23% | 53%
src-csharp0% | 0% | 45% | 14% | 39%
src-python/a2i0% | 0% | 9% | 26% | 63%
src-python0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
96 36 1
static void Main()
in src-csharp/Program.cs
37 2 1
def ExecuteTableValidations()
in src-python/trp/t_tables.py
34 12 3
public Page()
in src-csharp/TextractExtensions.cs
31 7 2
def merge_tables()
in src-python/trp/trp2.py
30 22 2
def add_key_values()
in src-python/trp/trp2.py
29 7 4
constructor()
in src-js/src/document.ts
29 7 2
constructor()
in src-js/src/document.ts
29 9 2
constructor()
in src-js/src/document.ts
29 6 2
def add_kv_ocr_confidence()
in src-python/trp/t_pipeline.py
27 8 1
constructor()
in src-js/src/document.ts
27 6 2
public Table()
in src-csharp/TextractExtensions.cs
27 7 2
public List GetLinesInReadingOrder()
in src-csharp/TextractExtensions.cs
27 6 0
def _parse()
in src-python/trp/__init__.py
26 9 2
public FieldValue()
in src-csharp/TextractExtensions.cs
26 6 3
constructor()
in src-js/src/document.ts
25 5 2
def rotate()
in src-python/trp/trp2.py
24 5 3
public Field()
in src-csharp/TextractExtensions.cs
24 9 2
def __init__()
in src-python/trp/__init__.py
23 10 3
def getLinesInReadingOrder()
in src-python/trp/__init__.py
23 8 1