microsoft / DLWorkspace
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 4,015 units with 204,745 lines of code in units (86.0% of code).
    • 56 very long units (155,299 lines of code)
    • 124 long units (8,403 lines of code)
    • 525 medium size units (16,229 lines of code)
    • 851 small units (12,474 lines of code)
    • 2,459 very small units (12,340 lines of code)
75% | 4% | 7% | 6% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js86% | 2% | 4% | 2% | 3%
py8% | 14% | 29% | 26% | 20%
cs18% | 23% | 35% | 14% | 8%
cpp0% | 100% | 0% | 0% | 0%
go0% | 85% | 0% | 0% | 14%
tsx0% | 0% | 18% | 21% | 59%
ts0% | 0% | 0% | 65% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/WebUI86% | 2% | 4% | 2% | 3%
src/ClusterManager17% | 21% | 26% | 16% | 17%
src/ClusterBootstrap11% | 13% | 29% | 25% | 19%
src/utils6% | 11% | 35% | 32% | 13%
src/docker-images2% | 20% | 21% | 30% | 23%
src/StorageManager0% | 12% | 29% | 30% | 27%
src/RestAPI0% | 7% | 14% | 25% | 52%
src/RepairManager0% | 0% | 37% | 32% | 29%
src/dev-utils0% | 0% | 50% | 6% | 43%
src/dashboard0% | 0% | 18% | 52% | 29%
src/user-synchronizer0% | 0% | 47% | 18% | 33%
src/ARM0% | 0% | 53% | 16% | 30%
src/ClusterPortal0% | 0% | 24% | 43% | 32%
src/e2e-test0% | 0% | 33% | 35% | 30%
src/RepairManagerAgent0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5738 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5738 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5738 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5717 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5717 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5717 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5710 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5710 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5710 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5553 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5547 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.jquery.js
5547 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.js
5547 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5381 1 3
(function(module, exports, __webpack_require__)()
in src/WebUI/dotnet/WebPortal/wwwroot/js/elasticsearch-js/elasticsearch.angular.js
5381 1 3