microsoft / MigrateToGraph
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 64 units with 716 lines of code in units (74.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (138 lines of code)
    • 28 small units (385 lines of code)
    • 30 very small units (193 lines of code)
0% | 0% | 19% | 53% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 19% | 53% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/commands0% | 0% | 33% | 66% | 0%
src/connectors0% | 0% | 18% | 56% | 24%
src/stream0% | 0% | 17% | 45% | 37%
src/transformer0% | 0% | 29% | 32% | 38%
src/helpers0% | 0% | 0% | 34% | 65%
src/loaders0% | 0% | 0% | 100% | 0%
src/utils0% | 0% | 0% | 61% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function sqlToGraph()
in src/commands/sqlToGraph.ts
29 2 5
export function run()
in src/commands/run.ts
24 2 2
22 1 1
public checkExists()
in src/connectors/gremlin-connector.ts
21 7 3
constructor()
in src/connectors/sql-input-connector.ts
21 2 1
public transformJSON()
in src/transformer/transformer.ts
21 2 3
export function sqlStreamReader()
in src/stream/reader.ts
20 2 1
constructor()
in src/connectors/gremlin-connector.ts
18 3 1
private addToGraph()
in src/connectors/gremlin-connector.ts
18 1 3
export function getPropertiesQuery()
in src/helpers/graphHelper.ts
18 5 1
export function jsonToGraph()
in src/commands/jsonToGraph.ts
16 2 4
export function getInputConnector()
in src/loaders/io-loader.ts
16 3 2
export function sqlToGraphCmd()
in src/commands/sqlToGraph.ts
15 2 4
private getRetryable()
in src/connectors/gremlin-connector.ts
15 2 1
private getCommand()
in src/connectors/gremlin-connector.ts
15 5 3
public saveOutput()
in src/connectors/gremlinCmd-output-connector.ts
15 3 2
export function jsonToGraphCmd()
in src/commands/jsonToGraph.ts
14 2 3
export function jsonToGremlinCmd()
in src/commands/jsonToGremlin.ts
14 2 3
public createGraph()
in src/connectors/gremlin-connector.ts
14 1 2
export function getOutputConnector()
in src/loaders/io-loader.ts
13 3 2