awslabs / game-analytics-pipeline
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 79 units with 1,394 lines of code in units (56.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (116 lines of code)
    • 5 simple units (112 lines of code)
    • 73 very simple units (1,166 lines of code)
0% | 0% | 8% | 8% | 83%
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
js0% | 0% | 8% | 8% | 83%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
services/events-processing/lib0% | 0% | 67% | 0% | 32%
services/api/lambda-authorizer0% | 0% | 0% | 62% | 37%
services/api/admin0% | 0% | 0% | 6% | 93%
services/analytics-processing/lib0% | 0% | 0% | 36% | 63%
resources/solution-helper/lib0% | 0% | 0% | 0% | 100%
resources/solution-helper0% | 0% | 0% | 0% | 100%
services/events-processing0% | 0% | 0% | 0% | 100%
services/analytics-processing0% | 0% | 0% | 0% | 100%
services/data-lake/glue-scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async processEvent()
in source/services/events-processing/lib/event.js
116 22 3
function AuthPolicy()
in source/services/api/lambda-authorizer/index.js
23 7 3
function addMethod()
in source/services/api/lambda-authorizer/index.js
24 7 4
function getStatementsForEffect()
in source/services/api/lambda-authorizer/index.js
21 7 2
async _deleteApplicationAuthorizations()
in source/services/api/admin/lib/admin.js
29 6 1
async buildMetric()
in source/services/analytics-processing/lib/cloudwatch.js
15 6 1
startKinesisAnalyticsApp()
in source/resources/solution-helper/lib/kinesis-helper.js
43 5 1
_checkAssignedDataType()
in source/resources/solution-helper/lib/dynamodb-helper.js
18 5 1
putDataCatalogEncryptionSettings()
in source/resources/solution-helper/lib/glue-helper.js
29 5 2
async getApplication()
in source/services/events-processing/lib/event.js
30 5 1
build()
in source/services/api/lambda-authorizer/index.js
15 5 0
async getApplicationDetail()
in source/services/api/admin/lib/admin.js
36 4 1
async _listApplicationAuthorizations()
in source/services/api/admin/lib/admin.js
52 4 2
async getAuthorizationDetail()
in source/services/api/admin/lib/admin.js
40 4 2
async createApiKey()
in source/services/api/admin/lib/admin.js
22 4 2
invokeFunctionSync()
in source/resources/solution-helper/lib/lambda-helper.js
23 3 1
createDashboard()
in source/resources/solution-helper/lib/cloudwatch-helper.js
200 3 1
getObject()
in source/resources/solution-helper/lib/s3-helper.js
24 3 2
saveItem()
in source/resources/solution-helper/lib/dynamodb-helper.js
27 3 2
async validateSchema()
in source/services/events-processing/lib/event.js
19 3 1