microsoft / appcenter-cli
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 719 units with 10,247 lines of code in units (72.9% of code).
    • 1 very long units (211 lines of code)
    • 21 long units (1,341 lines of code)
    • 137 medium size units (4,027 lines of code)
    • 182 small units (2,680 lines of code)
    • 378 very small units (1,988 lines of code)
2% | 13% | 39% | 26% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts2% | 13% | 40% | 25% | 18%
js0% | 0% | 11% | 46% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/commands/codepush11% | 30% | 25% | 17% | 14%
src/commands/distribute0% | 19% | 53% | 21% | 5%
src/util/commandline0% | 12% | 36% | 17% | 34%
src/commands/analytics0% | 13% | 68% | 10% | 7%
src/commands/orgs0% | 15% | 42% | 33% | 8%
src/commands/build0% | 15% | 49% | 22% | 12%
appcenter-file-upload-client-node/src0% | 10% | 40% | 31% | 18%
src/commands/crashes0% | 0% | 42% | 41% | 16%
src/util/interaction0% | 0% | 35% | 37% | 26%
src/commands/apps0% | 0% | 60% | 26% | 13%
src/commands/tokens0% | 0% | 77% | 8% | 14%
src/util/misc0% | 0% | 14% | 51% | 34%
src/commands0% | 0% | 31% | 41% | 26%
scripts0% | 0% | 11% | 46% | 42%
src/util/token-store0% | 0% | 26% | 30% | 42%
src/util/continuous-polling0% | 0% | 83% | 0% | 16%
src/commands/lib0% | 0% | 92% | 0% | 7%
src/util/apis0% | 0% | 25% | 55% | 19%
src/commands/profile0% | 0% | 52% | 0% | 48%
src/util/profile0% | 0% | 0% | 34% | 65%
src/util/portal0% | 0% | 0% | 51% | 48%
src/commands/telemetry0% | 0% | 0% | 0% | 100%
appcenter-file-upload-client-node/src/model0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export async function getReactNativeProjectAppVersion()
in src/commands/codepush/lib/react-native-utils.ts
211 44 2
export function runHermesEmitBinaryCommand()
in src/commands/codepush/lib/react-native-utils.ts
92 12 4
public async run()
in src/commands/orgs/collaborators/update.ts
90 12 1
public async run()
in src/commands/codepush/release-react.ts
83 25 1
public async run()
in src/commands/codepush/release-electron.ts
74 25 1
countChange: calculatePercentChange()
in src/commands/analytics/events/show.ts
68 4 2
public async run()
in src/commands/distribute/groups/show.ts
68 8 1
export function parseOptions()
in src/util/commandline/option-parser.ts
67 18 4
public async run()
in src/commands/distribute/releases/show.ts
61 9 1
async run()
in src/commands/build/logs.ts
60 15 1
public async run()
in src/commands/codepush/release-cordova.ts
60 9 1
export function parseOptions()
in src/util/commandline/option-parser.ts
60 18 1
private sendRequest()
in appcenter-file-upload-client-node/src/ac-fus-uploader.ts
59 14 1
public async run()
in src/commands/distribute/groups/list.ts
59 10 1
async run()
in src/commands/codepush/deployment/history.ts
57 6 1
protected async release()
in src/commands/codepush/lib/codepush-release-command-base.ts
57 12 1
export default async function sign()
in src/commands/codepush/lib/update-contents-tasks/sign.ts
57 11 2
async run()
in src/commands/codepush/patch.ts
56 17 1
public async run()
in src/commands/distribute/releases/delete.ts
55 10 1
public async run()
in src/commands/distribute/groups/update.ts
54 10 1