microsoft / Azure-DCAP-Client
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 109 units with 2,113 lines of code in units (50.5% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (366 lines of code)
    • 30 medium size units (960 lines of code)
    • 36 small units (561 lines of code)
    • 38 very small units (226 lines of code)
0% | 17% | 45% | 26% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 17% | 44% | 27% | 10%
h0% | 0% | 71% | 0% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Windows0% | 30% | 45% | 14% | 8%
src0% | 7% | 55% | 33% | 4%
src/Windows/dll0% | 56% | 30% | 9% | 4%
src/Linux0% | 13% | 27% | 30% | 28%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
std::unique_ptr curl_easy::create()
in src/Windows/curl_easy.cpp
94 8 3
static std::wstring sha256()
in src/Windows/local_cache.cpp
75 7 2
71 9 6
DWORD check_install_event_log_source()
in src/Windows/dll/evtx_logging.cpp
65 7 0
size_t curl_easy::header_callback()
in src/Linux/curl_easy.cpp
61 17 4
std::string curl_easy::unescape()
in src/Windows/curl_easy.cpp
49 7 1
bool get_cache_expiration_time()
in src/dcap_provider.cpp
46 5 3
46 6 1
45 6 3
bool fetch_response()
in src/dcap_provider.cpp
44 5 5
43 4 3
std::string curl_easy::escape()
in src/Windows/curl_easy.cpp
41 15 2
std::unique_ptr curl_easy::create()
in src/Linux/curl_easy.cpp
39 7 3
void log_message()
in src/logging.cpp
39 9 2
bool log_event_log_message()
in src/Windows/dll/evtx_logging.cpp
35 6 2
34 5 0
34 7 1
static int delete_path()
in src/Linux/local_cache.cpp
30 9 4
std::wstring UnicodeStringFromUtf8String()
in src/Windows/curl_easy.cpp
30 4 1
void curl_easy::perform()
in src/Windows/curl_easy.cpp
30 5 0