angular / universal
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 124 units with 2,252 lines of code in units (54.1% of code).
    • 1 very long units (107 lines of code)
    • 6 long units (424 lines of code)
    • 32 medium size units (931 lines of code)
    • 30 small units (453 lines of code)
    • 55 very small units (337 lines of code)
4% | 18% | 41% | 20% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts4% | 19% | 40% | 19% | 15%
js0% | 0% | 70% | 29% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
modules/builders12% | 26% | 32% | 16% | 10%
modules/express-engine0% | 26% | 38% | 25% | 8%
modules/common0% | 13% | 34% | 24% | 27%
modules/aspnetcore-engine0% | 0% | 78% | 17% | 3%
integration/express-engine-ivy-hybrid0% | 0% | 83% | 0% | 16%
integration/hapi-engine-ivy0% | 0% | 81% | 0% | 18%
scripts0% | 0% | 70% | 29% | 0%
modules/socket-engine0% | 0% | 90% | 0% | 9%
integration/express-engine-ivy0% | 0% | 72% | 0% | 27%
integration/common-engine0% | 0% | 71% | 0% | 28%
integration/clover0% | 0% | 75% | 0% | 24%
modules/hapi-engine0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function execute()
in modules/builders/src/ssr-dev-server/index.ts
107 14 2
async function initBrowserSync()
in modules/builders/src/ssr-dev-server/index.ts
85 12 4
async render()
in modules/common/clover/server/src/server-engine.ts
80 7 1
async function _renderUniversal()
in modules/builders/src/prerender/index.ts
78 11 6
function routingInitialNavigationRule()
in modules/express-engine/schematics/install/index.ts
64 16 1
export async function execute()
in modules/builders/src/static-generator/index.ts
59 7 2
function updateWorkspaceConfigRule()
in modules/express-engine/schematics/install/index.ts
58 4 1
export async function render()
in modules/builders/src/prerender/worker.ts
50 5 8
async render()
in modules/common/engine/src/engine.ts
49 16 1
function augmentAppModuleRule()
in modules/common/schematics/ng-add/index.ts
40 1 3
function updateWorkspaceRule()
in modules/common/schematics/ng-add/index.ts
38 4 1
function _getUniversalData()
in modules/aspnetcore-engine/src/main.ts
37 6 2
export async function app()
in integration/hapi-engine-ivy/server.ts
35 3 0
function buildTargetPackages()
in scripts/package-builder.js
33 5 3
function getProxyConfig()
in modules/builders/src/ssr-dev-server/index.ts
31 7 2
export function ngExpressEngine()
in modules/express-engine/src/main.ts
31 9 1
export async function getRoutes()
in modules/builders/src/prerender/utils.ts
30 8 3
export function startSocketEngine()
in modules/socket-engine/src/main.ts
30 2 4
export async function getRoutes()
in modules/builders/src/static-generator/utils.ts
29 7 3
async function _scheduleBuilds()
in modules/builders/src/prerender/index.ts
28 5 2