awslabs / amazon-qldb-driver-js
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 68 units with 713 lines of code in units (70.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (153 lines of code)
    • 3 medium size units (91 lines of code)
    • 13 small units (180 lines of code)
    • 50 very small units (289 lines of code)
0% | 21% | 12% | 25% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 21% | 12% | 25% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/integrationtest0% | 43% | 0% | 33% | 22%
src0% | 16% | 20% | 26% | 36%
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
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
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
11 3 2
private async _sendCommand()
in src/Communicator.ts
10 2 1
async getTableNames()
in src/QldbDriver.ts
10 1 0