microsoft / PowerBI-Developer-Samples
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 99 units with 1,697 lines of code in units (33.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (157 lines of code)
    • 23 simple units (655 lines of code)
    • 72 very simple units (885 lines of code)
0% | 0% | 9% | 38% | 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
py0% | 0% | 8% | 53% | 37%
js0% | 0% | 17% | 11% | 71%
java0% | 0% | 6% | 36% | 57%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
NodeJS/Embed for your customers/AppOwnsData/src0% | 0% | 21% | 14% | 64%
Java/Embed for your customers/AppOwnsData/src0% | 0% | 13% | 63% | 22%
Python/Encrypt credentials/Encryption sample0% | 0% | 21% | 51% | 27%
Python/Embed for your customers/AppOwnsData0% | 0% | 65% | 0% | 34%
Python/Encrypt credentials/Encryption sample/helper0% | 0% | 0% | 100% | 0%
Python/Embed for your customers/AppOwnsData/services0% | 0% | 0% | 64% | 35%
Python/Encrypt credentials/Encryption sample/services0% | 0% | 0% | 34% | 65%
Java/EncryptCredentials/src/main0% | 0% | 0% | 9% | 90%
NodeJS/Embed for your customers/AppOwnsData/public0% | 0% | 0% | 0% | 100%
React-TS/Embed for your organization/UserOwnsData/src0% | 0% | 0% | 0% | 100%
Python/Embed for your customers/AppOwnsData/models0% | 0% | 0% | 0% | 100%
Python/Encrypt credentials/Encryption sample/models0% | 0% | 0% | 0% | 100%
NodeJS/Embed for your customers/AppOwnsData/models0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function validateConfig()
in NodeJS/Embed for your customers/AppOwnsData/src/utils.js
48 21 0
def check_config()
in Python/Embed for your customers/AppOwnsData/utils.py
30 14 1
def validate_config()
in Python/Encrypt credentials/Encryption sample/utils.py
34 14 1
public static EmbedConfig getEmbedConfig()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
45 11 4
public static EmbedConfig getEmbedConfig()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
45 10 4
public static EmbedConfig getEmbedConfig()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
43 10 3
def get_access_token()
in Python/Embed for your customers/AppOwnsData/services/aadservice.py
24 10 0
def encrypt_segment()
in Python/Encrypt credentials/Encryption sample/helper/asymmetric1024keyencryptionhelper.py
29 10 4
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/authenticatedencryption.py
50 10 4
def get_embed_token_for_multiple_reports_multiple_workspaces()
in Python/Embed for your customers/AppOwnsData/services/pbiembedservice.py
24 9 4
def validate_add_data_source()
in Python/Encrypt credentials/Encryption sample/services/datavalidationservice.py
19 9 2
public ResponseEntity embedInfoController()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/controllers/EmbedController.java
43 8 0
public static EmbedToken getEmbedToken()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
40 8 4
def get_embed_token_for_multiple_reports_single_workspace()
in Python/Embed for your customers/AppOwnsData/services/pbiembedservice.py
23 8 4
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/asymmetric1024keyencryptionhelper.py
31 8 4
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/asymmetrichigherkeyencryptionhelper.py
29 8 4
public static EmbedToken getEmbedToken()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
38 7 4
def add_datasource()
in Python/Encrypt credentials/Encryption sample/app.py
30 7 0
def encrypt_credentials()
in Python/Encrypt credentials/Encryption sample/app.py
25 7 0
def get_access_token()
in Python/Encrypt credentials/Encryption sample/services/aadservice.py
30 7 0