microsoft / PowerBI-Developer-Samples
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 99 units with 1,697 lines of code in units (33.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 37 medium size units (1,102 lines of code)
    • 27 small units (416 lines of code)
    • 35 very small units (179 lines of code)
0% | 0% | 64% | 24% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 73% | 14% | 11%
java0% | 0% | 51% | 37% | 11%
js0% | 0% | 82% | 12% | 4%
tsx0% | 0% | 0% | 89% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Java/Embed for your customers/AppOwnsData/src0% | 0% | 77% | 18% | 3%
NodeJS/Embed for your customers/AppOwnsData/src0% | 0% | 91% | 7% | 1%
Python/Encrypt credentials/Encryption sample0% | 0% | 87% | 10% | 1%
Python/Embed for your customers/AppOwnsData/services0% | 0% | 95% | 0% | 4%
Python/Encrypt credentials/Encryption sample/helper0% | 0% | 100% | 0% | 0%
Java/EncryptCredentials/src/main0% | 0% | 26% | 54% | 19%
Python/Encrypt credentials/Encryption sample/services0% | 0% | 40% | 45% | 14%
Python/Embed for your customers/AppOwnsData0% | 0% | 65% | 0% | 34%
NodeJS/Embed for your customers/AppOwnsData/public0% | 0% | 54% | 45% | 0%
React-TS/Embed for your organization/UserOwnsData/src0% | 0% | 0% | 89% | 10%
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%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/authenticatedencryption.py
50 10 4
function validateConfig()
in NodeJS/Embed for your customers/AppOwnsData/src/utils.js
48 21 0
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
45 11 4
public ResponseEntity embedInfoController()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/controllers/EmbedController.java
43 8 0
public static EmbedConfig getEmbedConfig()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
43 10 3
public static EmbedToken getEmbedToken()
in Java/Embed for your customers/AppOwnsData/src/main/java/com/embedsample/appownsdata/services/PowerBIService.java
40 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 validate_config()
in Python/Encrypt credentials/Encryption sample/utils.py
34 14 1
async function getEmbedTokenForMultipleReportsMultipleWorkspaces()
in NodeJS/Embed for your customers/AppOwnsData/src/embedConfigService.js
32 6 3
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/asymmetric1024keyencryptionhelper.py
31 8 4
async function getEmbedTokenForMultipleReportsSingleWorkspace()
in NodeJS/Embed for your customers/AppOwnsData/src/embedConfigService.js
30 5 3
def check_config()
in Python/Embed for your customers/AppOwnsData/utils.py
30 14 1
def add_datasource()
in Python/Encrypt credentials/Encryption sample/app.py
30 7 0
def get_access_token()
in Python/Encrypt credentials/Encryption sample/services/aadservice.py
30 7 0
async function getEmbedTokenForSingleReportSingleWorkspace()
in NodeJS/Embed for your customers/AppOwnsData/src/embedConfigService.js
29 4 3
def encrypt_segment()
in Python/Encrypt credentials/Encryption sample/helper/asymmetric1024keyencryptionhelper.py
29 10 4
def encrypt()
in Python/Encrypt credentials/Encryption sample/helper/asymmetrichigherkeyencryptionhelper.py
29 8 4
def update_datasource()
in Python/Encrypt credentials/Encryption sample/app.py
27 6 0
def update_datasource()
in Python/Encrypt credentials/Encryption sample/services/updatecredentialsservice.py
26 4 7