tensorflow / community
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 22 units with 171 lines of code in units (58.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (31 lines of code)
    • 6 small units (76 lines of code)
    • 15 very small units (64 lines of code)
0% | 0% | 18% | 44% | 37%
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% | 18% | 44% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
20210731-tfjs-named-tensors0% | 0% | 18% | 44% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function dot()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
31 2 2
public _permuteIndexTo()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
15 1 2
function liftedFn()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
13 3 1
export function stackGtensors()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
12 2 2
_resetDim()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
12 2 0
public rename()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
12 3 2
export function makeInitializer()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
12 5 1
constructor()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
10 2 2
function liftedFn()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
8 2 1
export function gtensorOfDims()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
7 2 1
export function stack()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
7 1 2
constructor()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
6 1 1
export function liftFnOverDim()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
5 1 2
get dtype()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
3 1 0
public transpose()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
3 1 0
public permuteDimNameToLast()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
3 1 1
export function makeZeros()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
3 1 2
export function makeOnes()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
3 1 2
public renaming()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
2 1 0
export function fromInitializer()
in rfcs/20210731-tfjs-named-tensors/gtensor.ts
2 1 0