angular / angular-cn
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 258 units with 3,219 lines of code in units (28.0% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (371 lines of code)
    • 38 medium size units (1,190 lines of code)
    • 58 small units (817 lines of code)
    • 156 very small units (841 lines of code)
0% | 11% | 36% | 25% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 11% | 36% | 25% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/doc-shredder0% | 29% | 29% | 25% | 14%
tools/api-builder0% | 15% | 39% | 14% | 29%
tools/plunker-builder0% | 17% | 35% | 16% | 30%
ROOT0% | 0% | 47% | 34% | 18%
public/resources0% | 0% | 29% | 26% | 44%
public/translate0% | 0% | 38% | 20% | 40%
tools/example-zipper0% | 0% | 30% | 58% | 11%
tools/fs-utils0% | 0% | 0% | 56% | 43%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
$process: function()
in tools/api-builder/angular.io-package/processors/addJadeDataDocsProcessor.js
83 8 1
$process: function()
in tools/doc-shredder/processors/shredMapProcessor.js
73 8 1
function buildRegionDocs()
in tools/doc-shredder/regionExtractor.js
59 12 2
var createShredMapPackage = function()
in tools/doc-shredder/doc-shredder.js
52 3 1
_createPostData()
in tools/plunker-builder/builder.js
52 15 1
$process: function()
in tools/api-builder/docs-package/processors/generateNavigationDoc.js
52 4 1
_initConfigAndCollectFileNames()
in tools/plunker-builder/builder.js
50 11 1
controller: function()
in public/resources/js/directives/api-list.js
49 2 4
compile: function()
in public/resources/js/directives/live-example.js
47 24 2
function getLinkInfoImpl()
in tools/api-builder/links-package/services/getLinkInfo.js
44 15 3
function getCommentInfo()
in tools/doc-shredder/regionExtractor.js
43 10 1
40 9 0
39 7 2
handler: function()
in tools/api-builder/links-package/inline-tag-defs/linkDocs.js
39 13 3
process: function()
in tools/api-builder/angular.io-package/rendering/indentForMarkdown.js
38 12 2
36 8 0
function createShredJadePackage()
in tools/doc-shredder/doc-shredder.js
35 3 1
function createShredExamplePackage()
in tools/doc-shredder/doc-shredder.js
34 2 1
function processExportDoc()
in tools/api-builder/angular.io-package/processors/addJadeDataDocsProcessor.js
34 7 1
_buildPlunkerFrom()
in tools/plunker-builder/builder.js
33 10 1