microsoft / vscode-azure-blockchain-ethereum
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 975 units with 9,759 lines of code in units (68.4% of code).
    • 1 very long units (158 lines of code)
    • 5 long units (299 lines of code)
    • 85 medium size units (2,354 lines of code)
    • 245 small units (3,458 lines of code)
    • 639 very small units (3,490 lines of code)
1% | 3% | 24% | 35% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts1% | 3% | 24% | 35% | 35%
js0% | 0% | 29% | 39% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src40% | 21% | 5% | 0% | 32%
src/Generators0% | 10% | 31% | 38% | 20%
src/debugAdapter0% | 3% | 21% | 34% | 40%
src/resourceExplorers0% | 3% | 35% | 42% | 18%
src/helpers0% | 4% | 33% | 32% | 29%
src/commands0% | 0% | 44% | 28% | 26%
src/services0% | 0% | 15% | 44% | 40%
src/validators0% | 0% | 15% | 34% | 50%
src/ARMBlockchain0% | 0% | 7% | 65% | 27%
src/Models0% | 0% | 5% | 18% | 75%
src/pages0% | 0% | 21% | 32% | 45%
resources/welcome0% | 0% | 37% | 22% | 40%
src/ViewItems0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
158 4 1
public static initialize()
in src/Constants.ts
84 2 1
export function generateFlowAppForMicroservice()
in src/Generators/CodeGenerator/CodeGenerator.ts
59 9 4
function astToNetworkOptions()
in src/debugAdapter/configurationReader.ts
53 35 1
private async createBlockchainDataManagerInstance()
in src/resourceExplorers/BlockchainDataManagerResourceExplorer.ts
52 1 6
51 7 4
export function generateLogicAppForMicroservice()
in src/Generators/CodeGenerator/CodeGenerator.ts
49 5 5
function astToNetworkOptions()
in src/helpers/truffleConfig.ts
49 32 1
private async getSelectedTransactionNode()
in src/resourceExplorers/BlockchainDataManagerResourceExplorer.ts
43 5 4
export function tryExecuteCommandInForkAsync()
in src/debugAdapter/cmdCommandExecutor.ts
41 4 3
export async function getPrivateKeyFromMnemonic()
in src/commands/TruffleCommands.ts
40 4 0
function createServer()
in src/services/infuraService/codeFlowLogin.ts
39 8 0
function networkOptionsToAst()
in src/debugAdapter/configurationReader.ts
38 11 1
async function setContractParameters()
in src/helpers/openZeppelinHelper.ts
38 8 1
public async createAzureConsortium()
in src/resourceExplorers/ConsortiumResourceExplorer.ts
38 1 3
export function extractEnumsInfo()
in src/helpers/enumExtractor.ts
37 6 2
public async createProject()
in src/resourceExplorers/BlockchainDataManagerResourceExplorer.ts
37 4 2
export async function startSolidityDebugger()
in src/commands/DebuggerCommands.ts
35 4 0
35 3 4
function networkOptionsToAst()
in src/helpers/truffleConfig.ts
35 10 1