aws / aws-lambda-nodejs-runtime-interface-client
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 50 units with 660 lines of code in units (60.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 5 simple units (155 lines of code)
    • 45 very simple units (505 lines of code)
0% | 0% | 0% | 23% | 76%
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% | 0% | 0% | 24% | 75%
cc0% | 0% | 0% | 18% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Errors0% | 0% | 0% | 73% | 26%
src/Runtime0% | 0% | 0% | 23% | 76%
src/RuntimeClient0% | 0% | 0% | 13% | 86%
src/utils0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/Common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function _rawCallbackContext()
in src/Runtime/CallbackContext.ts
56 8 3
constructor()
in src/Errors/XRayError.ts
39 7 1
export function isError()
in src/Errors/index.ts
11 7 1
27 6 1
Napi::Value Error()
in src/RuntimeClient/runtime-client.cc
22 6 1
Napi::Value Next()
in src/RuntimeClient/runtime-client.cc
46 5 1
Napi::Value Done()
in src/RuntimeClient/runtime-client.cc
21 5 1
function _loadUserApp()
in src/utils/UserFunction.ts
17 5 3
Napi::Value InitializeClient()
in src/RuntimeClient/runtime-client.cc
19 4 1
private getHeaderValue()
in src/Runtime/InvokeContext.ts
14 4 1
19 3 1
export function run()
in src/index.ts
36 3 2
function _trySerializeResponse()
in src/RuntimeClient/RuntimeClient.ts
7 3 1
function _splitHandlerString()
in src/utils/UserFunction.ts
7 3 1
export const load = function()
in src/utils/UserFunction.ts
21 3 2
async handleOnce()
in src/Runtime/Runtime.ts
26 3 0
function _parseJson()
in src/Runtime/InvokeContext.ts
11 3 2
async nextInvocation()
in src/RuntimeClient/RuntimeClient.ts
36 2 0
function _resolveHandler()
in src/utils/UserFunction.ts
5 2 2
function _canLoadAsFile()
in src/utils/UserFunction.ts
3 2 1