aws / aws-lambda-nodejs-runtime-interface-client
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 50 units with 660 lines of code in units (60.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 10 medium size units (297 lines of code)
    • 10 small units (141 lines of code)
    • 29 very small units (166 lines of code)
0% | 8% | 45% | 21% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 10% | 38% | 22% | 29%
cc0% | 0% | 76% | 16% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Runtime0% | 23% | 10% | 21% | 44%
src/RuntimeClient0% | 0% | 76% | 11% | 11%
src/Errors0% | 0% | 62% | 28% | 8%
src/utils0% | 0% | 37% | 36% | 25%
src0% | 0% | 100% | 0% | 0%
src/Common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function _rawCallbackContext()
in src/Runtime/CallbackContext.ts
56 8 3
Napi::Value Next()
in src/RuntimeClient/runtime-client.cc
46 5 1
constructor()
in src/Errors/XRayError.ts
39 7 1
export function run()
in src/index.ts
36 3 2
async nextInvocation()
in src/RuntimeClient/RuntimeClient.ts
36 2 0
27 6 1
async handleOnce()
in src/Runtime/Runtime.ts
26 3 0
function _patchConsoleWith()
in src/utils/LogPatch.ts
23 1 1
Napi::Value Error()
in src/RuntimeClient/runtime-client.cc
22 6 1
Napi::Value Done()
in src/RuntimeClient/runtime-client.cc
21 5 1
export const load = function()
in src/utils/UserFunction.ts
21 3 2
19 3 1
Napi::Value InitializeClient()
in src/RuntimeClient/runtime-client.cc
19 4 1
function _loadUserApp()
in src/utils/UserFunction.ts
17 5 3
const _logToFd = function()
in src/utils/LogPatch.ts
14 1 1
private getHeaderValue()
in src/Runtime/InvokeContext.ts
14 4 1
clientContext: _parseJson()
in src/Runtime/InvokeContext.ts
13 1 1
private _setErrorCallbacks()
in src/Runtime/Runtime.ts
12 1 1
export function isError()
in src/Errors/index.ts
11 7 1
function _tryRequire()
in src/utils/UserFunction.ts
11 2 3