awslabs / dynamodb-data-mapper-js
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 226 units with 2,576 lines of code in units (48.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (342 lines of code)
    • 9 medium complex units (355 lines of code)
    • 18 simple units (398 lines of code)
    • 196 very simple units (1,481 lines of code)
0% | 13% | 13% | 15% | 57%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 13% | 13% | 15% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/dynamodb-data-marshaller/src0% | 34% | 10% | 14% | 40%
packages/dynamodb-expressions/src0% | 21% | 31% | 0% | 47%
packages/dynamodb-batch-iterator/src0% | 0% | 20% | 33% | 46%
packages/dynamodb-auto-marshaller/src0% | 0% | 18% | 33% | 48%
packages/dynamodb-query-iterator/src0% | 0% | 9% | 19% | 70%
packages/dynamodb-data-mapper-annotations/src0% | 0% | 29% | 0% | 70%
packages/dynamodb-data-mapper/src0% | 0% | 0% | 9% | 90%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function marshallValue()
in packages/dynamodb-data-marshaller/src/marshallItem.ts
186 43 2
function unmarshallValue()
in packages/dynamodb-data-marshaller/src/unmarshallItem.ts
70 34 2
function parsePath()
in packages/dynamodb-expressions/src/AttributePath.ts
86 26 1
function isBinaryType()
in packages/dynamodb-data-mapper-annotations/src/attribute.ts
13 22 1
export function serializeConditionExpression()
in packages/dynamodb-expressions/src/ConditionExpression.ts
71 21 2
export function isConditionExpressionPredicate()
in packages/dynamodb-expressions/src/ConditionExpression.ts
31 18 1
export function isSchemaType()
in packages/dynamodb-data-marshaller/src/SchemaType.ts
43 16 2
public unmarshallValue()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
52 14 1
protected async doBatchRequest()
in packages/dynamodb-batch-iterator/src/BatchWrite.ts
53 13 0
export function keysFromSchema()
in packages/dynamodb-data-marshaller/src/keysFromSchema.ts
39 12 1
export function isConditionExpression()
in packages/dynamodb-expressions/src/ConditionExpression.ts
26 11 1
export function mergeConsumedCapacities()
in packages/dynamodb-query-iterator/src/mergeConsumedCapacities.ts
27 11 2
public marshallValue()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
22 10 1
private collectSet()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
31 10 2
export function toSchemaName()
in packages/dynamodb-data-marshaller/src/toSchemaName.ts
33 9 2
private async refillPending()
in packages/dynamodb-batch-iterator/src/BatchOperation.ts
28 8 0
function mergeCapacityMaps()
in packages/dynamodb-query-iterator/src/mergeConsumedCapacities.ts
20 8 2
private marshallSet()
in packages/dynamodb-auto-marshaller/src/Marshaller.ts
20 8 1
function normalizeConditionExpression()
in packages/dynamodb-data-marshaller/src/marshallExpression.ts
23 8 2
export function isKey()
in packages/dynamodb-data-marshaller/src/isKey.ts
16 8 2