aws-amplify / amplify-cli
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 5,259 units with 83,880 lines of code in units (57.1% of code).
    • 4 very complex units (727 lines of code)
    • 22 complex units (3,235 lines of code)
    • 180 medium complex units (10,618 lines of code)
    • 469 simple units (16,889 lines of code)
    • 4,584 very simple units (52,411 lines of code)
<1% | 3% | 12% | 20% | 62%
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
ts1% | 3% | 10% | 20% | 64%
js0% | 4% | 18% | 19% | 57%
py0% | 40% | 15% | 14% | 30%
tsx0% | 0% | 8% | 46% | 45%
go0% | 0% | 0% | 32% | 67%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/amplify-provider-awscloudformation5% | 7% | 15% | 18% | 52%
packages/amplify-category-function6% | 0% | 13% | 27% | 51%
packages/graphql-key-transformer0% | 65% | 0% | 9% | 25%
packages/amplify-category-interactions0% | 27% | 11% | 22% | 39%
packages/amplify-graphql-transformer-core0% | 5% | 7% | 19% | 67%
packages/amplify-category-auth0% | 5% | 22% | 18% | 54%
packages/graphql-auth-transformer0% | 4% | 42% | 26% | 26%
packages/graphql-transformer-core0% | 4% | 21% | 17% | 55%
packages/graphql-elasticsearch-transformer0% | 8% | 3% | 7% | 80%
packages/amplify-graphql-searchable-transformer0% | 5% | 2% | 3% | 88%
packages/amplify-category-notifications0% | 5% | 8% | 29% | 56%
packages/amplify-cli0% | 1% | 13% | 20% | 65%
packages/amplify-velocity-template0% | 5% | 16% | 25% | 52%
packages/graphql-mapping-template0% | 6% | 0% | 0% | 93%
packages/amplify-category-api0% | 0% | 17% | 30% | 52%
packages/amplify-category-storage0% | 0% | 7% | 29% | 63%
packages/amplify-e2e-core0% | 0% | 4% | 10% | 85%
packages/amplify-frontend-ios0% | 0% | 37% | 15% | 47%
packages/amplify-util-mock0% | 0% | 13% | 22% | 63%
packages/amplify-frontend-android0% | 0% | 38% | 15% | 45%
packages/amplify-category-analytics0% | 0% | 28% | 10% | 61%
packages/amplify-frontend-javascript0% | 0% | 24% | 9% | 66%
packages/amplify-graphql-index-transformer0% | 0% | 13% | 23% | 62%
packages/amplify-frontend-flutter0% | 0% | 34% | 16% | 49%
packages/amplify-category-predictions0% | 0% | 7% | 13% | 79%
packages/amplify-graphql-auth-transformer0% | 0% | 30% | 31% | 37%
packages/amplify-category-custom0% | 0% | 34% | 10% | 54%
packages/amplify-appsync-simulator0% | 0% | 6% | 24% | 69%
packages/graphql-transformer-common0% | 0% | 14% | 24% | 60%
packages/graphql-dynamodb-transformer0% | 0% | 5% | 27% | 67%
packages/amplify-app0% | 0% | 24% | 22% | 53%
scripts0% | 0% | 44% | 0% | 55%
packages/amplify-cli-core0% | 0% | 11% | 13% | 74%
packages/amplify-storage-simulator0% | 0% | 21% | 4% | 73%
packages/amplify-console-hosting0% | 0% | 7% | 9% | 82%
packages/amplify-dynamodb-simulator0% | 0% | 44% | 11% | 44%
packages/amplify-graphql-relational-transformer0% | 0% | 6% | 21% | 72%
packages/amplify-container-hosting0% | 0% | 11% | 35% | 52%
packages/amplify-category-hosting0% | 0% | 4% | 24% | 70%
packages/amplify-category-xr0% | 0% | 13% | 22% | 64%
packages/amplify-nodejs-function-runtime-provider0% | 0% | 34% | 0% | 65%
packages/amplify-graphiql-explorer0% | 0% | 6% | 43% | 49%
packages/amplify-nodejs-function-template-provider0% | 0% | 0% | 71% | 28%
packages/amplify-dotnet-function-template-provider0% | 0% | 0% | 65% | 34%
packages/amplify-graphql-model-transformer0% | 0% | 0% | 25% | 75%
packages/amplify-graphql-transformer-migrator0% | 0% | 0% | 39% | 60%
packages/amplify-util-uibuilder0% | 0% | 0% | 53% | 46%
packages/graphql-predictions-transformer0% | 0% | 0% | 14% | 85%
packages/amplify-python-function-runtime-provider0% | 0% | 0% | 46% | 53%
packages/graphql-connection-transformer0% | 0% | 0% | 14% | 85%
packages/amplify-graphql-predictions-transformer0% | 0% | 0% | 9% | 90%
packages/amplify-go-function-runtime-provider0% | 0% | 0% | 32% | 67%
packages/graphql-versioned-transformer0% | 0% | 0% | 22% | 77%
packages/amplify-java-function-runtime-provider0% | 0% | 0% | 23% | 76%
packages/graphql-relational-schema-transformer0% | 0% | 0% | 3% | 96%
packages/amplify-util-headless-input0% | 0% | 0% | 47% | 52%
packages/amplify-graphql-default-value-transformer0% | 0% | 0% | 40% | 59%
packages/amplify-cli-logger0% | 0% | 0% | 15% | 84%
packages/amplify-prompts0% | 0% | 0% | 78% | 21%
packages/graphql-http-transformer0% | 0% | 0% | 0% | 100%
packages/amplify-category-geo0% | 0% | 0% | 0% | 100%
packages/amplify-graphql-http-transformer0% | 0% | 0% | 0% | 100%
packages/graphql-function-transformer0% | 0% | 0% | 0% | 100%
packages/amplify-graphql-function-transformer0% | 0% | 0% | 0% | 100%
packages/amplify-graphql-maps-to-transformer0% | 0% | 0% | 0% | 100%
cypress/integration0% | 0% | 0% | 0% | 100%
packages/amplify-python-function-template-provider0% | 0% | 0% | 0% | 100%
packages/amplify-java-function-template-provider0% | 0% | 0% | 0% | 100%
packages/amplify-dotnet-function-runtime-provider0% | 0% | 0% | 0% | 100%
packages/amplify-go-function-template-provider0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export async function run()
in packages/amplify-provider-awscloudformation/src/push-resources.ts
251 66 3
storeExpressionVals = function()
in packages/amplify-category-function/src/provider-utils/awscloudformation/utils/cronExpression.ts
157 65 3
addToSet = function()
in packages/amplify-category-function/src/provider-utils/awscloudformation/utils/cronExpression.ts
84 57 4
export async function formNestedStack()
in packages/amplify-provider-awscloudformation/src/push-resources.ts
235 52 7
async function serviceWalkthrough()
in packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthroughs/auth-questions.js
152 49 5
export function verifyInput()
in packages/amplify-cli/src/input-manager.ts
75 35 2
def _lambda_handler()
in packages/graphql-elasticsearch-transformer/streaming-lambda/python_streaming_function.py
86 34 2
def _lambda_handler()
in packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py
85 34 2
export async function transformGraphQLSchema()
in packages/amplify-provider-awscloudformation/src/graphql-transformer/transform-graphql-schema.ts
175 33 2
getPropMethod: function()
in packages/amplify-velocity-template/src/compile/references.js
71 33 3
async function uploadAppSyncFiles()
in packages/amplify-provider-awscloudformation/src/upload-appsync-files.js
153 32 4
private protectUpdateOrDeleteMutation()
in packages/graphql-auth-transformer/src/ModelAuthTransformer.ts
121 32 9
async function init()
in packages/amplify-provider-awscloudformation/src/amplify-service-manager.js
169 30 1
version: str()
in packages/graphql-key-transformer/src/KeyTransformer.ts
309 30 1
operation: str()
in packages/graphql-key-transformer/src/KeyTransformer.ts
308 30 1
limit: ref()
in packages/graphql-key-transformer/src/KeyTransformer.ts
307 30 1
query: ref()
in packages/graphql-key-transformer/src/KeyTransformer.ts
306 30 1
function printExpr()
in packages/graphql-mapping-template/src/print.ts
63 29 2
async function determineAuthFlow()
in packages/amplify-provider-awscloudformation/src/configuration-manager.ts
76 29 2
export async function transformGraphQLSchema()
in packages/amplify-provider-awscloudformation/src/transform-graphql-schema.ts
161 29 2