awslabs / amazon-qldb-driver-nodejs
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 74 units with 792 lines of code in units (69.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (153 lines of code)
    • 4 medium size units (134 lines of code)
    • 15 small units (204 lines of code)
    • 53 very small units (301 lines of code)
0% | 19% | 16% | 25% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 19% | 16% | 25% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/integrationtest0% | 43% | 0% | 33% | 22%
src0% | 13% | 25% | 27% | 33%
src/errors0% | 0% | 0% | 0% | 100%
src/retry0% | 0% | 0% | 0% | 100%
src/stats0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static getIonTypes()
in src/integrationtest/TestUtils.ts
80 1 0
async executeLambda()
in src/QldbDriver.ts
73 17 1
private async _pushPageValues()
in src/ResultReadable.ts
43 10 0
37 12 3
private async _sendExecute()
in src/Transaction.ts
29 2 2
async executeLambda()
in src/QldbSession.ts
25 5 1
private async waitForDeletion()
in src/integrationtest/TestUtils.ts
20 4 0
async commit()
in src/Transaction.ts
17 2 0
async executeStatement()
in src/Communicator.ts
16 1 3
15 4 2
async waitForActive()
in src/integrationtest/TestUtils.ts
15 4 0
static toQldbHash()
in src/QldbHash.ts
13 2 1
static _concatenate()
in src/QldbHash.ts
13 3 1
async runForceDeleteLedger()
in src/integrationtest/TestUtils.ts
13 3 0
async readIonValue()
in src/integrationtest/TestUtils.ts
13 2 2
constructor()
in src/ResultReadable.ts
12 3 3
static _handleBlob()
in src/Result.ts
12 4 1
static _hashComparator()
in src/QldbHash.ts
12 5 2
async commit()
in src/Communicator.ts
11 1 2
async fetchPage()
in src/Communicator.ts
11 1 2