microsoft / paris
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 65 units with 561 lines of code in units (25.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (105 lines of code)
    • 17 small units (234 lines of code)
    • 44 very small units (222 lines of code)
0% | 0% | 18% | 41% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 19% | 40% | 39%
js0% | 0% | 0% | 68% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/modeling0% | 0% | 33% | 41% | 25%
lib0% | 0% | 51% | 0% | 48%
lib/api/repository0% | 0% | 19% | 27% | 52%
lib/data_access0% | 0% | 0% | 68% | 31%
lib/config0% | 0% | 0% | 67% | 32%
lib/config/services0% | 0% | 0% | 83% | 16%
lib/config/decorators0% | 0% | 0% | 26% | 73%
ROOT0% | 0% | 0% | 68% | 31%
lib/api0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private makeApiCall()
in lib/paris.ts
37 12 5
private getFieldData()
in lib/modeling/modeler.ts
26 20 3
private doSaveItems()
in lib/api/repository/repository.ts
21 7 3
private getSubModel()
in lib/modeling/modeler.ts
21 7 3
protected setAllItems()
in lib/api/repository/readonly-repository.ts
18 4 0
export function queryToHttpOptions()
in lib/data_access/query-to-http.ts
18 9 1
static getFieldRawData()
in lib/modeling/modeler.ts
18 9 2
private setModelLinks()
in lib/modeling/modeler.ts
17 10 1
private setActiveRequest()
in lib/data_access/data-store.service.ts
16 2 4
private getDataEntityTypeFields()
in lib/config/services/entities.service.base.ts
15 9 1
private get valuesMap()
in lib/config/model-config.ts
13 5 0
constructor()
in lib/data_access/cache.ts
13 3 1
static getParamsQuery()
in lib/data_access/http.service.ts
13 4 2
private validateFieldData()
in lib/modeling/modeler.ts
13 7 2
export function EntityField()
in lib/config/decorators/entity-field.decorator.ts
12 5 1
get idField()
in lib/config/model-config.ts
12 9 0
static httpOptionsToRequestInit()
in lib/data_access/http.service.ts
12 7 2
function build()
in gulpfile.js
11 1 0
private getRelationQueryWhere()
in lib/api/repository/relationship-repository.ts
11 6 1
constructor()
in lib/config/model-config.ts
11 3 2