microsoft / rush-example
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 23 units with 392 lines of code in units (66.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (185 lines of code)
    • 9 small units (161 lines of code)
    • 8 very small units (46 lines of code)
0% | 0% | 47% | 41% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 47% | 41% | 11%
ts0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
common/scripts0% | 0% | 47% | 41% | 11%
libraries/my-controls/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function _resolvePackageVersion()
in common/scripts/install-run.js
42 7 3
function installAndRun()
in common/scripts/install-run.js
42 7 4
function _copyAndTrimNpmrcFile()
in common/scripts/install-run.js
31 8 2
function _run()
in common/scripts/install-run.js
25 5 0
function _run()
in common/scripts/install-run-rush.js
23 6 0
function getNpmPath()
in common/scripts/install-run.js
22 5 0
function _parsePackageSpecifier()
in common/scripts/install-run.js
20 5 1
function findRushJsonFolder()
in common/scripts/install-run.js
20 5 0
function _cleanInstallFolder()
in common/scripts/install-run.js
20 5 2
function _getRushVersion()
in common/scripts/install-run-rush.js
19 3 0
function _createPackageJson()
in common/scripts/install-run.js
19 2 3
function _installPackage()
in common/scripts/install-run.js
18 3 3
function _syncNpmrc()
in common/scripts/install-run.js
16 5 3
function _ensureAndJoinPath()
in common/scripts/install-run.js
16 4 2
function _isPackageAlreadyInstalled()
in common/scripts/install-run.js
13 3 1
function _getRushTempFolder()
in common/scripts/install-run.js
10 2 1
function runWithErrorAndStatusCode()
in common/scripts/install-run.js
10 2 1
function _writeFlagFile()
in common/scripts/install-run.js
9 2 1
function _ensureFolder()
in common/scripts/install-run.js
7 2 1
function _getBinPath()
in common/scripts/install-run.js
5 2 2