dart-lang / js_facade_gen
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 204 units with 2,227 lines of code in units (41.3% of code).
    • 1 very long units (139 lines of code)
    • 1 long units (55 lines of code)
    • 30 medium size units (888 lines of code)
    • 30 small units (413 lines of code)
    • 142 very small units (732 lines of code)
6% | 2% | 39% | 18% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts6% | 2% | 40% | 18% | 32%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib8% | 3% | 43% | 16% | 29%
lib/json0% | 0% | 49% | 33% | 16%
lib/json/types0% | 0% | 47% | 0% | 52%
lib/json/named_declarations0% | 0% | 0% | 35% | 64%
lib/json/module_declarations0% | 0% | 0% | 14% | 85%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
139 37 2
55 7 2
42 9 3
private translate()
in lib/main.ts
42 8 1
private visitFunctionLike()
in lib/declaration.ts
41 12 2
41 6 2
visitClassBody()
in lib/declaration.ts
40 11 2
merge()
in lib/merge.ts
38 11 1
35 14 1
35 14 2
private visitClassLikeHelper()
in lib/declaration.ts
34 5 5
private computeName()
in lib/facade_converter.ts
34 7 1
visitTypeName()
in lib/facade_converter.ts
32 7 1
31 25 1
function convertModifier()
in lib/json/node.ts
30 12 1
export function convertNode()
in lib/json/conversions.ts
29 12 1
export function convertMember()
in lib/json/conversions.ts
29 11 1
visitParameters()
in lib/base.ts
29 11 2
visit()
in lib/main.ts
27 9 1
26 4 1