awslabs / amazon-qldb-driver-js
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 68 units with 713 lines of code in units (70.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (110 lines of code)
    • 1 simple units (5 lines of code)
    • 65 very simple units (598 lines of code)
0% | 0% | 15% | <1% | 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
ts0% | 0% | 15% | <1% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 24% | 0% | 75%
src/errors0% | 0% | 0% | 6% | 93%
src/integrationtest0% | 0% | 0% | 0% | 100%
src/retry0% | 0% | 0% | 0% | 100%
src/stats0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async executeLambda()
in src/QldbDriver.ts
73 17 1
37 12 3
5 6 2
static _hashComparator()
in src/QldbHash.ts
12 5 2
async executeLambda()
in src/QldbSession.ts
25 5 1
function isRetryableStatusCode()
in src/errors/Errors.ts
6 4 1
function _prepend()
in src/LogUtil.ts
9 4 2
15 4 2
async waitForActive()
in src/integrationtest/TestUtils.ts
15 4 0
private async waitForDeletion()
in src/integrationtest/TestUtils.ts
20 4 0
static _handleBlob()
in src/Result.ts
9 3 1
constructor()
in src/QldbHash.ts
6 3 1
static _concatenate()
in src/QldbHash.ts
13 3 1
11 3 2
8 3 0
async runForceDeleteLedger()
in src/integrationtest/TestUtils.ts
13 3 0
3 2 1
async commit()
in src/Transaction.ts
17 2 0
private async _sendExecute()
in src/Transaction.ts
29 2 2
constructor()
in src/retry/RetryConfig.ts
7 2 2