angular / protractor
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 473 units with 4,615 lines of code in units (37.6% of code).
    • 0 very long units (0 lines of code)
    • 10 long units (749 lines of code)
    • 39 medium size units (1,195 lines of code)
    • 66 small units (965 lines of code)
    • 358 very small units (1,706 lines of code)
0% | 16% | 25% | 20% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 24% | 23% | 18% | 32%
js0% | 9% | 27% | 22% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 25% | 25% | 21% | 27%
website0% | 9% | 38% | 29% | 21%
testapp0% | 0% | 24% | 15% | 59%
spec0% | 0% | 10% | 13% | 76%
debugging0% | 0% | 0% | 0% | 100%
exampleTypescript0% | 0% | 0% | 0% | 100%
stress0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
it()
in website/docgen/spec/add-links-spec.js
84 1 2
function findRepeaterElement()
in lib/clientsidescripts.js
83 26 6
async get()
in lib/browser.ts
82 15 2
function findRepeaterColumn()
in lib/clientsidescripts.js
82 26 5
async run()
in lib/runner.ts
78 17 0
public async run()
in lib/taskRunner.ts
78 8 0
async createBrowser()
in lib/runner.ts
77 12 2
async waitForAngular()
in lib/browser.ts
76 22 1
async getNewDriver()
in lib/driverProviders/direct.ts
57 9 0
private byRepeaterInner()
in lib/locators.ts
52 2 2
start()
in lib/bpRunner.ts
42 3 0
constructor()
in lib/element.ts
41 6 2
it()
in website/docgen/spec/add-links-spec.js
38 1 2
it()
in website/docgen/spec/add-links-spec.js
38 1 2
it()
in website/docgen/spec/add-links-spec.js
38 1 2
it()
in website/docgen/spec/add-links-spec.js
38 1 2
constructor()
in lib/taskScheduler.ts
38 6 1
function findRepeaterRows()
in lib/clientsidescripts.js
37 13 4
(function (global)()
in testapp/upgrade/systemjs.config.js
37 1 1
36 13 3