microsoft / cobalt
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 91 units with 983 lines of code in units (14.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (23 lines of code)
    • 37 small units (569 lines of code)
    • 53 very small units (391 lines of code)
0% | 0% | 2% | 57% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 2% | 57% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
test-harness0% | 0% | 28% | 23% | 48%
test-harness/terratest-extensions/modules0% | 0% | 0% | 61% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func CleanAll()
in test-harness/magefile.go
23 10 0
func ListNamespaceAuthRulesE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
20 5 3
func ListTopicAuthRulesE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
20 5 4
func WebAppCDUriE()
in test-harness/terratest-extensions/modules/azure/webapp.go
20 6 3
func FindAndRunTests()
in test-harness/magefile.go
19 5 1
func listDataFactoryByResourceGroupE()
in test-harness/terratest-extensions/modules/azure/datafactory.go
19 5 2
func listPipelinesByDataFactoryE()
in test-harness/terratest-extensions/modules/azure/datafactory.go
19 5 3
func listDatasetByDataFactory()
in test-harness/terratest-extensions/modules/azure/datafactory.go
19 5 3
func listLinkedServiceByDataFactory()
in test-harness/terratest-extensions/modules/azure/datafactory.go
19 5 3
func listMlWorkspaceByResourceGroupE()
in test-harness/terratest-extensions/modules/azure/mlworkspace.go
19 5 2
func VnetsIDListE()
in test-harness/terratest-extensions/modules/azure/network.go
19 5 2
func ListServiceBusNamespaceE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
19 5 1
func ListServiceBusNamespaceByResourceGroupE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
19 5 2
func ListNamespaceTopicsE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
19 5 3
func ListTopicSubscriptionsE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
19 5 4
func ListTopicSubscriptionsNameE()
in test-harness/terratest-extensions/modules/azure/servicebus.go
19 5 4
func getAppCollections()
in test-harness/terratest-extensions/modules/azure/webapp.go
19 5 1
func VnetSubnetsListE()
in test-harness/terratest-extensions/modules/azure/network.go
15 4 3
func listDatasetIDByDataFactoryE()
in test-harness/terratest-extensions/modules/azure/datafactory.go
14 4 3
func listLinkedServicesIDByDataFactoryE()
in test-harness/terratest-extensions/modules/azure/datafactory.go
14 4 3