microsoft / PowerBI-visuals-tools
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 107 units with 1,512 lines of code in units (77.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (445 lines of code)
    • 11 simple units (267 lines of code)
    • 88 very simple units (800 lines of code)
0% | 0% | 29% | 17% | 52%
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
js0% | 0% | 31% | 17% | 50%
ts0% | 0% | 30% | 7% | 61%
r0% | 0% | 0% | 47% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 35% | 19% | 44%
templates/visuals/rhtml0% | 0% | 25% | 20% | 53%
templates/visuals/table0% | 0% | 45% | 0% | 54%
templates/visuals/rvisual0% | 0% | 0% | 53% | 46%
spec/helpers0% | 0% | 0% | 0% | 100%
templates0% | 0% | 0% | 0% | 100%
templates/visuals/slicer0% | 0% | 0% | 0% | 100%
templates/visuals/default0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function createCertFile()
in lib/CertificateTools.js
143 24 2
function generateSettings()
in lib/VisualGenerator.js
81 21 2
async function resolveCertificate()
in lib/CertificateTools.js
64 18 0
static validationLog()
in lib/ConsoleWriter.js
37 13 1
static generate()
in lib/VisualGenerator.js
33 13 3
public update()
in templates/visuals/rhtml/src/visual.ts
23 11 1
private injectCodeFromPayload()
in templates/visuals/rhtml/src/visual.ts
33 11 1
export function visualTransform()
in templates/visuals/table/src/visualTransform.ts
31 11 1
public update()
in templates/visuals/rvisual/src/visual.ts
22 10 1
async function getGlobalPbivizCerts()
in lib/CertificateTools.js
22 9 0
async function veryfyCertFile()
in lib/CertificateTools.js
31 9 4
static formattedErrors()
in lib/ConsoleWriter.js
16 9 1
static infoTable()
in lib/ConsoleWriter.js
15 8 3
static checkVisualName()
in lib/VisualGenerator.js
23 8 1
33 8 3
async function getCertFile()
in lib/CertificateTools.js
22 7 2
async function removeCertFiles()
in lib/CertificateTools.js
23 7 3
FlattenHTML <- function()
in templates/visuals/rhtml/r_files/flatten_HTML.r
45 7 2
async setApiVersion()
in lib/TemplateFetcher.js
15 6 0
static loadVisualPackage()
in lib/VisualPackage.js
12 5 1