microsoft / azure-pipelines-agent-cookbook
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 27 units with 156 lines of code in units (31.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (26 lines of code)
    • 1 small units (17 lines of code)
    • 25 very small units (113 lines of code)
0% | 0% | 16% | 10% | 72%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 0% | 16% | 10% | 72%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources0% | 0% | 100% | 0% | 0%
libraries0% | 0% | 0% | 13% | 86%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
remove_agent
in resources/default.rb
26 2 1
vsts_unix_service
in libraries/service.rb
17 5 1
append_arguments
in libraries/helpers.rb
10 4 2
set_auth
in libraries/helpers.rb
9 4 2
vsts_service
in libraries/service.rb
7 2 1
load_state
in libraries/helpers.rb
6 2 1
vsagentexec
in libraries/helpers.rb
6 2 1
initialize
in libraries/service.rb
6 1 4
vsts_windows_service
in libraries/service.rb
6 2 1
get_archive_name
in libraries/helpers.rb
5 2 1
state_file
in libraries/helpers.rb
5 2 1
restart
in libraries/service.rb
5 2 0
download_url
in libraries/helpers.rb
4 1 1
remove_current_state
in libraries/helpers.rb
4 2 1
service_name
in libraries/service.rb
4 3 0
windows?
in libraries/helpers.rb
3 1 0
debian?
in libraries/helpers.rb
3 1 0
rhel?
in libraries/helpers.rb
3 1 0
osx?
in libraries/helpers.rb
3 1 0
service_exist?
in libraries/helpers.rb
3 1 1