awslabs / dynamodb-data-mapper-js
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 226 units with 2,576 lines of code in units (48.2% of code).
    • 1 very long units (186 lines of code)
    • 5 long units (332 lines of code)
    • 22 medium size units (628 lines of code)
    • 48 small units (710 lines of code)
    • 150 very small units (720 lines of code)
7% | 12% | 24% | 27% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts7% | 12% | 24% | 27% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/dynamodb-data-marshaller/src24% | 9% | 18% | 31% | 16%
packages/dynamodb-expressions/src0% | 38% | 14% | 11% | 35%
packages/dynamodb-batch-iterator/src0% | 20% | 34% | 32% | 12%
packages/dynamodb-auto-marshaller/src0% | 18% | 18% | 26% | 36%
packages/dynamodb-data-mapper/src0% | 0% | 33% | 31% | 35%
packages/dynamodb-query-iterator/src0% | 0% | 37% | 23% | 38%
packages/dynamodb-data-mapper-annotations/src0% | 0% | 0% | 61% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function marshallValue()
in packages/dynamodb-data-marshaller/src/marshallItem.ts
186 43 2
function parsePath()
in packages/dynamodb-expressions/src/AttributePath.ts
86 26 1
export function serializeConditionExpression()
in packages/dynamodb-expressions/src/ConditionExpression.ts
71 21 2
function unmarshallValue()
in packages/dynamodb-data-marshaller/src/unmarshallItem.ts
70 34 2
protected async doBatchRequest()
in packages/dynamodb-batch-iterator/src/BatchWrite.ts
53 13 0
public unmarshallValue()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
52 14 1
export function isSchemaType()
in packages/dynamodb-data-marshaller/src/SchemaType.ts
43 16 2
protected async doBatchRequest()
in packages/dynamodb-batch-iterator/src/BatchGet.ts
41 7 0
export function keysFromSchema()
in packages/dynamodb-data-marshaller/src/keysFromSchema.ts
39 12 1
async createTable()
in packages/dynamodb-data-mapper/src/DataMapper.ts
36 3 2
export function toSchemaName()
in packages/dynamodb-data-marshaller/src/toSchemaName.ts
33 9 2
function indexDefinitions()
in packages/dynamodb-data-mapper/src/DataMapper.ts
32 6 3
export function isConditionExpressionPredicate()
in packages/dynamodb-expressions/src/ConditionExpression.ts
31 18 1
private collectSet()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
31 10 2
private async refillPending()
in packages/dynamodb-batch-iterator/src/BatchOperation.ts
28 8 0
function handleVersionAttribute()
in packages/dynamodb-data-mapper/src/DataMapper.ts
28 2 2
export function mergeConsumedCapacities()
in packages/dynamodb-query-iterator/src/mergeConsumedCapacities.ts
27 11 2
export function isConditionExpression()
in packages/dynamodb-expressions/src/ConditionExpression.ts
26 11 1
protected getNext()
in packages/dynamodb-query-iterator/src/QueryPaginator.ts
26 4 0
protected getNext()
in packages/dynamodb-query-iterator/src/ScanPaginator.ts
26 4 0