dart-lang / wasm
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 86 units with 803 lines of code in units (28.1% 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)
    • 6 simple units (93 lines of code)
    • 80 very simple units (710 lines of code)
0% | 0% | 0% | 11% | 88%
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
py0% | 0% | 0% | 41% | 58%
dart0% | 0% | 0% | 5% | 94%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
wasm/tool0% | 0% | 0% | 41% | 58%
wasm/lib/src0% | 0% | 0% | 6% | 93%
wasm/example0% | 0% | 0% | 0% | 100%
flutter_wasm/example/lib0% | 0% | 0% | 0% | 100%
flutter_wasm/android/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool fill()
in wasm/lib/src/wasmer_api.dart
22 9 2
def parseType()
in wasm/tool/generate_ffi_boilerplate.py
24 8 1
def addFn()
in wasm/tool/generate_ffi_boilerplate.py
10 7 1
String wasmerValKindName()
in wasm/lib/src/wasmer_api.dart
16 6 1
def removePrefix()
in wasm/tool/generate_ffi_boilerplate.py
5 6 1
def getWasmerApi()
in wasm/tool/generate_ffi_boilerplate.py
16 6 0
String _getLibName()
in wasm/lib/src/runtime.dart
6 5 0
dynamic apply()
in wasm/lib/src/module.dart
17 5 1
String wasmerExternKindName()
in wasm/lib/src/wasmer_api.dart
14 5 1
def addPrefix()
in wasm/tool/generate_ffi_boilerplate.py
5 5 1
String _getLibPath()
in wasm/lib/src/runtime.dart
8 4 0
static void _call()
in wasm/lib/src/module.dart
18 4 3
void enableWasi()
in wasm/lib/src/module.dart
13 4 3
void main()
in wasm/example/brotli.dart
77 4 1
String _getImportExportString()
in wasm/lib/src/runtime.dart
19 3 3
String describe()
in wasm/lib/src/module.dart
12 3 0
int _getIndex()
in wasm/lib/src/module.dart
10 3 2
WasmInstance build()
in wasm/lib/src/module.dart
8 3 0
Pointer loadModule()
in wasm/lib/src/runtime.g.dart
25 3 3
Pointer _externTypeToFuncOrGlobalType()
in wasm/lib/src/runtime.g.dart
11 3 2