tensorflow / sig-tfjs
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 35 units with 447 lines of code in units (22.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (90 lines of code)
    • 3 medium size units (119 lines of code)
    • 8 small units (134 lines of code)
    • 23 very small units (104 lines of code)
0% | 20% | 26% | 29% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 96% | 0% | 0% | 3%
ts0% | 0% | 33% | 37% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
toolings/tfjs-debugger0% | 96% | 0% | 0% | 3%
toolings/tfjs-debugger/src/app/components0% | 0% | 41% | 29% | 29%
toolings/tfjs-debugger/src/app/data_model0% | 0% | 0% | 100% | 0%
toolings/tfjs-debugger/src/app/layout_generator0% | 0% | 0% | 100% | 0%
toolings/tfjs-debugger/src/app/services0% | 0% | 0% | 0% | 100%
toolings/tfjs-debugger/src/app/app0% | 0% | 0% | 0% | 100%
toolings/tfjs-debugger/src/app/common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
module.exports = function()
in toolings/tfjs-debugger/karma-ci.conf.js
90 1 1
ngOnInit()
in toolings/tfjs-debugger/src/app/components/backend_selector/backend_version_selector.component.ts
41 9 0
ngOnInit()
in toolings/tfjs-debugger/src/app/components/graph_panel/graph_panel.component.ts
40 7 0
ngOnInit()
in toolings/tfjs-debugger/src/app/components/model_selector/model_selector.component.ts
38 4 0
ngOnInit()
in toolings/tfjs-debugger/src/app/components/input_selector/input_selector.component.ts
20 3 0
get runButtonDisabledMessage()
in toolings/tfjs-debugger/src/app/components/app_bar/app_bar.component.ts
18 8 0
export function releaseJsonToTfjsRelease()
in toolings/tfjs-debugger/src/app/data_model/tfjs_release.ts
17 4 1
handleSelectionChange()
in toolings/tfjs-debugger/src/app/components/model_selector/model_selector.component.ts
17 2 1
function layoutModelGraph()
in toolings/tfjs-debugger/src/app/layout_generator/layout_generator.worker.ts
16 5 1
export function modelJsonToModelGraph()
in toolings/tfjs-debugger/src/app/data_model/run_results.ts
16 5 1
private fetchModelJsonFilesIfChanged()
in toolings/tfjs-debugger/src/app/components/graph_panel/graph_panel.component.ts
16 7 2
ngOnInit()
in toolings/tfjs-debugger/src/app/components/backend_selector/backend_selector.component.ts
14 2 0
ngOnInit()
in toolings/tfjs-debugger/src/app/components/error_panel/error_panel.component.ts
10 2 0
async updateUrlParameters()
in toolings/tfjs-debugger/src/app/services/url_service.ts
10 1 1
handleSelectionChange()
in toolings/tfjs-debugger/src/app/components/input_selector/input_selector.component.ts
8 1 1
handleSelectionChange()
in toolings/tfjs-debugger/src/app/components/backend_selector/backend_selector.component.ts
7 1 1
ngOnInit()
in toolings/tfjs-debugger/src/app/components/app_bar/app_bar.component.ts
6 1 0
handleTfjsModelUrlChanged()
in toolings/tfjs-debugger/src/app/components/model_selector/model_selector.component.ts
6 1 0
private updateUrlWithVersion()
in toolings/tfjs-debugger/src/app/components/backend_selector/backend_version_selector.component.ts
6 1 1
ngOnInit()
in toolings/tfjs-debugger/src/app/components/config_section/config_section.component.ts
5 2 0